You need to determine the action that will be subscribed to the required intent filters:
<activity android:name="DeepLinkListener" android:exported="true" > <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:host="host" android:pathPattern="some regex" android:scheme="scheme" /> </intent-filter> </activity>
Then in onCreate of your DeepLinkListener action you can access the host, circuit, etc:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent deepLinkingIntent= getIntent(); deepLinkingIntent.getScheme(); deepLinkingIntent.getData().getPath(); }
perform a check along the way and re-launch the intention to take the user to the appropriate action. data for more help
Now run the intent:
Intent intent = new Intent (Intent.ACTION_VIEW); intent.setData (Uri.parse(DEEP_LINK_URL));
source share