user283494
user283494

Reputation: 1907

Finding the right intent filter

I want to have a background service running which gets started when an Image is opened in the gallery and then does something fancy with the image... As far as I know the opening of the image in the gallery would trigger a new intent to display this image. (Correct me if I'm wrong). My idea was to catch that Intent in the intent filter of said service I want to implement.

Here's my intent filter from the manifest:

<service android:name=".MyService">
<intent-filter> 
<action android:name="android.intent.action.PICK" /> 
<category android:name="android.intent.category.DEFAULT"  /> 
<data android:path="/external/images/media" android:scheme="content" /> 
</intent-filter>
</service>

This intent filter does not work and I don't know why. What is the correct intent filter/how can I find it?

Upvotes: 1

Views: 1064

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007624

What is the correct intent filter/how can I find it?

You can't do this. You cannot intercept an Intent used to start an Activity.

Upvotes: 3

Related Questions