Reputation: 4344
I hope this question doesn't offend people, am genuinely posting this cause I have already spent hours trying to find solution for it. Please help if you can.
My agenda is put my app in chooser dialog which comes after user click "Set as" or "Set picture as" in gallery application of phone, I know this is certainly possible coz both whatsapp and google photos have included there app in that list.
this is what I have tried so far, but its not helping my cause, my app doesn't feature there, please share your thoughts over this problem.
<activity
android:name=".ui.ProfileView"
android:label="@string/app_name"
android:theme="@style/FullscreenTheme"
android:windowSoftInputMode="stateHidden" >
<intent-filter>
<action android:name="android.intent.action.ATTACH_DATA"/>
<action android:name="android.intent.action.SET_WALLPAPER"/>
<data android:mimeType="image/*" />
</intent-filter>
</activity>
Upvotes: 1
Views: 428
Reputation: 44118
I believe you're missing the intent's category. Also remember that an intent can have only a single action, so you'd probably want:
<intent-filter>
<action android:name="android.intent.action.SET_WALLPAPER"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.ATTACH_DATA"/>
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
Not sure if it will work, but give it a go.
Upvotes: 1