Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make my android app appear in the share list [duplicate]

How do i make my application appear here? :

enter image description here

some informations led me to put this code on my Manifest (See code below) but it doesn't work. The thing is if i want to share an image from my gallery, i want to see my app on the list of app on the share list. Any pointers? please help.

<activity
        android:name="com.my.package.MyIntent"
        android:label="@string/app_name"
        android:screenOrientation="portrait" >
        <intent-filter>
            <action android:name="android.intent.action.ALL_APPS" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:mimeType="text/plain" />
        </intent-filter>
    </activity>

Thank you :)

like image 545
CENT1PEDE Avatar asked Nov 30 '22 01:11

CENT1PEDE


1 Answers

Try this way

       <activity
        android:name="yourActivity"
        android:icon="@drawable/ic_launcher"
        android:label="test">
        <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.SEND" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:mimeType="image/*" />
        </intent-filter>

        <intent-filter>
            <action android:name="android.intent.action.SEND" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:mimeType="text/plain" />
        </intent-filter>

        <intent-filter>
            <action android:name="android.intent.action.SEND_MULTIPLE" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:mimeType="image/*" />
        </intent-filter>
    </activity>

For more information go to Receiving Simple Data from Other Apps and Sending Simple Data to Other Apps

like image 124
M D Avatar answered Dec 05 '22 01:12

M D