0

I want Android to suggest my app for choosing an image from gallery. But it is not included in the list of apps, not even when I try to attach a file in the Gmail app.

Here is my manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.pick_me"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.example.pick_me.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.PICK" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
</application>

Mahm00d
  • 3,881
  • 8
  • 44
  • 83
ZahraZT
  • 49
  • 1
  • 1
  • 7
  • @Andrei Anischevici: I test it, nothing changed. My app isn't in the list. – ZahraZT Dec 14 '14 at 10:50
  • A note for your future questions: You don't need to add the context at its beginning (like `Android:...`). Tags exist for this purpose. – Mahm00d Jan 07 '15 at 13:56

1 Answers1

0

You could try registering your app with the image/* mime type, similarly to the answer to this question.

So, you'd have something like:

<activity name="com.your.activity">
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="file" />
        <data android:mimeType="image/*" />
        <data android:pathPattern=".*\\.*" />
    </intent-filter>
</activity>

Or:

<intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <action android:name="android.intent.action.SEND" />
        <action android:name="android.intent.action.PICK" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.ALTERNATIVE" />
        <data android:mimeType="image/*" />
</intent-filter>
Community
  • 1
  • 1