> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deeplink.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Android setup

> Configure Android App Links for the DeepLink React Native SDK

To open your app from DeepLink links on Android and attribute installs, you need **App Links** (for opening the app from links) and the SDK’s install-referrer usage (for attributing the install).

## App Links (for opening the app from links)

So that links like `https://your-subdomain.deeplink-domain.com/your-path` open your app:

1. In `android/app/src/main/AndroidManifest.xml`, add an intent filter to your main Activity (e.g. `MainActivity`). Use `singleTask` so links don’t stack activities.

Replace the host with the subdomain you use in the DeepLink dashboard:

```xml theme={null}
<activity
  android:name=".MainActivity"
  android:launchMode="singleTask"
  android:exported="true">

  <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
  </intent-filter>

  <intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data
      android:scheme="https"
      android:host="your-subdomain.deeplink-domain.com"
      android:pathPrefix="/" />
  </intent-filter>
</activity>
```

2. Replace `android:host` (and path if needed) with the host you use in the DeepLink dashboard.

DeepLink can host the required `assetlinks.json` for your domain once the app (package name and SHA-256 fingerprint) is configured in the dashboard. You don’t need to host or manage this file yourself.

## Initialize the SDK

In your React Native app, call the SDK `configure` with your API key (and optional base URL) as shown in [Installation](/sdk/react-native-installation). On first launch, the SDK will:

* Read the **Play Install Referrer** (when present).
* Report the install to the Track Install API so clicks from your DeepLink domain can be attributed.
* Process any launch deep link from the Activity intent.

## Troubleshooting

* **App doesn’t open from link** — Confirm the host in the intent filter matches the link domain, and that `assetlinks.json` is reachable and correct.
* **Install not attributed** — Ensure the user actually installed from a link that points to your DeepLink domain (and that the referrer is set by the store/link).

<Card title="Handling links" icon="link" href="/sdk/react-native-handling-links">
  Pass deep link URLs to the SDK and subscribe to resolved/failed events.
</Card>
