# Targeting

## Request permissions

{% hint style="info" %}
This step is **completely optional** and should only be implemented if it is convenient for the application’s purpose.
{% endhint %}

The app may request the location permissions so that our SDK can obtain the user's current location and display more relevant ads based on that information.

For this, it is necessary to add the following permissions in the `AndroidManifest.xml` file:

```markup
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
```

Following this, the app must request the permissions so that users can grant them.

### Example

{% tabs %}
{% tab title="Kotlin" %}

```java
private val PERMISSIONS = arrayOf(
    Manifest.permission.ACCESS_FINE_LOCATION,
    Manifest.permission.ACCESS_COARSE_LOCATION
)

ActivityCompat.requestPermissions(this, PERMISSIONS, 100)
```

{% endtab %}

{% tab title="Java" %}

```java
private static final String[] PERMISSIONS = {
    Manifest.permission.ACCESS_FINE_LOCATION,
    Manifest.permission.ACCESS_COARSE_LOCATION
};

ActivityCompat.requestPermissions(this, PERMISSIONS, 100);
```

{% endtab %}
{% endtabs %}


---

# 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://docs.wortise.com/en/android-sdk/sdk-integration/targeting.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.
