Add supported links programatically in react-native android

53 views Asked by At

I have implementing deep-linking in my react-native app. Below I am attaching manifest code.

<application
  android:name=".MainApplication"
  android:label="@string/app_name"
  android:icon="@mipmap/ic_launcher"
  android:roundIcon="@mipmap/ic_launcher_round"
  android:allowBackup="false"
  android:theme="@style/AppTheme">
  <activity
    android:name=".MainActivity"
    android:label="@string/app_name"
    android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
    android:launchMode="singleTask"
    android:windowSoftInputMode="adjustPan"
    android:screenOrientation="portrait"
    android:exported="true">
    <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="api.uat.watermelon.market"
              android:pathPrefix="/" />
    </intent-filter>
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
  </activity>
</application>

And the deeplink was not working until i open the app settings -> Open by default. And adding link manually enter image description here

How can i add the default links programatically ?

Thanks in advance.

0

There are 0 answers