You need to embed this data in the path that you add to the URI scheme. Say you configured your activity with the following intent filter with a custom myapp scheme:
<intent-filter> <data android:scheme="myapp" /> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> </intent-filter>
Now create a link and add all the data you want to use in the URI scheme as query parameters:
myapp:
Then in onCreate you can analyze the intention
Uri data = this.getIntent().getData(); if (data != null && data.isHierarchical() && activity != null) { if (data.getQueryParameter("custom_param1") != null) { String param1 = data.getQueryParameter("custom_param1");
Or you can use a service such as Branch , which allows you to combine unlimited data in JSON format into a link that is retrieved by click on the link and the application. This makes this process easier.
source share