T
T
Telephony
Search
K
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 Necessary Permissions

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.

Request Phone and SMS Permissions

Telephony telephony = Telephony.instance;
bool permissionsGranted = await telephony.requestPhoneAndSmsPermissions;

Request SMS Permissions

bool permissionsGranted = await telephony.requestSmsPermissions;

Request Phone Permissions

bool permissionsGranted = await telephony.requestPhonePermissions;