# Declare your app's audio permissions

Add the following to your AndroidManifest.xml, inside the bottom of the element.

```
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
```

#### If your application uses Trill SDK as a receiver, the application would need to ask  record audio permissions from the user. To facilitate the same, follow the below steps:&#x20;

Make sure the SDK is initialised after the permission block.

```
String[] neededPermissions = {
       Manifest.permission.RECORD_AUDIO
};

if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) {
   ActivityCompat.requestPermissions(this, neededPermissions, 1);
} else {
    // Instantiate TrillSDK
}
```

To do so check if Manifest.permission.RECORD\_AUDIO is available for the application, if not ask for permission. Once permission is given by USER, TrillSDK can be initialised.

```
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
   super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    // Instantiate TrillSDK
}
```


---

# 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://trillbit.gitbook.io/trillbit-sdk/android-support/trill-sdk-for-android/setup-guide/integrating-the-sdk/declare-your-apps-audio-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.
