Interface DialerService

  • All Known Implementing Classes:
    AndroidDialerService, DummyDialerService, IOSDialerService

    public interface DialerService
    Using the dialer service, you can initiate a call to the provided phone number. The implementation will use the device's default dial application to make the phone call.

    Example

     DialerService.create().ifPresent(service -> {
          service.call("+32987123456");
      });

    Android Configuration

    The permission android.permission.CALL_PHONE needs to be added.

    Note: these modifications are handled automatically by Client plugin if it is used.
     <manifest ...>
        <uses-permission android:name="android.permission.CALL_PHONE"/>
        ...
       <activity android:name="com.gluonhq.impl.attach.plugins.android.PermissionRequestActivity" />
      </manifest>

    iOS Configuration: none

    Since:
    3.0.0
    • Method Detail

      • call

        void call​(java.lang.String number)
        Starts a phone call to the given number with the native dial application.
        Parameters:
        number - A valid telephone number, without spaces, optionally including an international prefix.