- 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.
<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 Summary
Modifier and TypeMethodDescriptionvoid
Starts a phone call to the given number with the native dial application.static Optional<DialerService>
create()
Returns an instance ofDialerService
.
-
Method Details
-
create
Returns an instance ofDialerService
.- Returns:
- An instance of
DialerService
.
-
call
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.
-