How to add app to "Share via" list for camera picture on Android

Functions like the "share via" in Android work with broadcast intents. The app creates this intent and the system reports all the activities that can execute that (twitter, fb...) You specify what an activity can do by means of intent filters.

In your case I searched for "android camera share intent" and found generally that the intent filter looks like this:

<intent-filter>
    <action android:name="android.intent.action.SEND" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="image/*" />
</intent-filter>

(not sure about the data section)

I don't know if camera app uses a specific content provider, anyway your app should be able to manage at least the URI scheme that app uses.


I wanted to Share text content and i add the below code in manifest and its works...

    <activity android:name=".SendMessage.SendMessageLeads"
        android:label="SMS Composer"
        android:icon="@drawable/sms_composer">

        <intent-filter>
           <action android:name="android.intent.action.SEND" />
           <category android:name="android.intent.category.DEFAULT" />
           <data android:mimeType="text/plain" />
       </intent-filter>

    </activity>

Tags:

Android