# 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](/sending-an-sms.md)                                      | **`SEND_SMS`**    |
| [Query SMS](/query-sms.md), [Query Conversation](/query-conversations.md) | **`READ_SMS`**    |
| [Listen Incoming SMS](/listen-incoming-sms.md)                            | **`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;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://telephony.shounakmulay.dev/permissions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
