# Permissions

{% hint style="danger" %}
**Telephony will only request those permission that are listed in the&#x20;*****`AndroidManifest.xml`*****.**
{% endhint %}

Following necessary permissions are also listed at the top of every page.&#x20;

| Use Case                                                                                                                                | Permission        |
| --------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
| [Sending An SMS](https://telephony.shounakmulay.dev/sending-an-sms)                                                                     | **`SEND_SMS`**    |
| [Query SMS](https://telephony.shounakmulay.dev/query-sms), [Query Conversation](https://telephony.shounakmulay.dev/query-conversations) | **`READ_SMS`**    |
| [Listen Incoming SMS](https://telephony.shounakmulay.dev/listen-incoming-sms)                                                           | **`RECEIVE_SMS`** |

### List Necessary Permissions

List the permission necessary for your use cases in your app's `AndroidManifest.xml`

{% code title="AndroidManifest.xml" %}

```markup
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.READ_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
```

{% endcode %}

{% hint style="warning" %}
**Although this plugin will check and ask for permissions at runtime, it is advisable to&#x20;*****manually ask for permissions*****&#x20;before calling any other functions.**
{% endhint %}

### Request Phone and SMS Permissions

```dart
Telephony telephony = Telephony.instance;

bool permissionsGranted = await telephony.requestPhoneAndSmsPermissions;
```

### Request SMS Permissions

```dart
bool permissionsGranted = await telephony.requestSmsPermissions;
```

### Request Phone Permissions

```dart
bool permissionsGranted = await telephony.requestPhonePermissions;
```
