Reputation: 1712
I would like to create a series of apps that will be opened via URL scheme. What I would like to do is to use the same base scheme for all of them but be able to specify which app to open... somthing like this:
Is it possible?
THX
Upvotes: 0
Views: 479
Reputation: 49986
You can do it using <intent-filter>
in your <activity>
:
<activity android:name=".activity.Activity">
<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:scheme="myApp" />
<data android:host="app1" />
</intent-filter>
</activity>
this should work for myApp://app1
, I am not sure if intent-filter can parse more complicated URLs like open?appUrl="app1"
Upvotes: 1
Reputation: 17922
Yes this is possible. You'll need to specify the URL scheme within the corresponding BroadcastReceiver
of your apps.
Upvotes: 0