Comment on page
Permissions
Telephony will only request those permission that are listed in the
AndroidManifest.xml
.Following necessary permissions are also listed at the top of every page.
Use Case | Permission |
SEND_SMS | |
READ_SMS | |
RECEIVE_SMS |
List the permission necessary for your use cases in your app's
AndroidManifest.xml
AndroidManifest.xml
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.READ_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
Although this plugin will check and ask for permissions at runtime, it is advisable to manually ask for permissions before calling any other functions.
Telephony telephony = Telephony.instance;
bool permissionsGranted = await telephony.requestPhoneAndSmsPermissions;
bool permissionsGranted = await telephony.requestSmsPermissions;
bool permissionsGranted = await telephony.requestPhonePermissions;
Last modified 3yr ago