Reputation: 71
When web-page contains file picker, user clicks on button, "choose an action" popup appears (as you can see on picture; also it is Google Chrome).
What intent-filter should I add to activity in AndroidManifest file in order to my app appeared in "choose an action" list?
Upvotes: 1
Views: 1059
Reputation: 71
I've found a solution. Not perfect, but still... It is described here. You need to add next code to your activity description in AndroidManifest file:
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.OPENABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
</intent-filter>
So you need to choose "Files" option and your application will be available from menu:
I'm still looking for solution to make app available from first 'chooser' menu. If anyone willing to help.
Upvotes: 1
Reputation: 806
Try using the android.intent.action.PICK
filter inside your activity.
<intent-filter>
<action android:name="android.intent.action.PICK"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<data android:scheme="folder"></data>
</intent-filter>
From the android doc it says about ACTION_PICK
:
Activity Action: Pick an item from the data, returning what was selected.
Upvotes: 0