I'm working on an activity which other 3rd parties want to use in their own apps, via intents.
Right now this activity is catching urls via an intent filter, like this:
<activity android:name=".MyActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="www.mysite.com" android:pathPrefix="/test/" android:scheme="http"></data>
</intent-filter>
</activity>
The above works, whenever a user clicks a link in my app like:
"mysite.com/test/blah.html"
my app comes up as a choice, along with the browser, to open the link.
Now if a third party wants to use my app, I think they can use the above like this:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://mysite.com/test/somedata"));
startActivity(intent);
While this would work, this probably won't give them the desired effect of jumping directly to my activity from theirs - the android chooser dialog will appear, asking if they want to open the intent data with the browser, or my app.
How can I let 3rd parties call my activity directly without broadcasting the intent like this? I'd like to make them still pass the same exact data scheme to me, but just let them open my activity directly.
Thank you