I need my Android application to run a certain Activity in my app, responding to the following Uri data from the Intent that was sent out:
If I use the following in my manifest (for the Activity that I want to respond to the Intent), I can capture this, but the chooser pops up (which I don’t want):
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="http" android:host="www.example.com" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Since I don’t want the chooser to pop up, I tried to use the android:pathPattern, or android:pathPrefix in the tag to further filter to make sure that only my app responds but it isn’t working for me.
Can anyone help me do this?
It looks like your dealing with data which comes from your own application, so don’t use your “private” URL as the target of the intent but create a component specific Intent and give it the URL of your data as an EXTRA parameter.
Something like:
In yourActivity.class, you would just have to get the Uri with the following code: