Reputation: 1729
I am trying to add my app in the "share" menu that comes when you try to attach an image in whats app or any other chat app. I just cant seem to figure this out. I want something like this:-
This is in what's app when i try to attach a picture, i click on "Gallery". It takes me to gallery and then in the share menu, I want my app to be present their..
I have tried putting these intent filters in my manifest but they don't seem to be working.
<intent-filter>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="image/*" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="image/*" />
</intent-filter>
My app has pictures that can be attached in chat but i don't know why it doesn't show up in the menu. Please help
my manifest:-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myfragments"
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/Theme.AppCompat" >
<activity android:name=".TabActivity" />
<activity android:name=".MainActivity" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="image/*" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Upvotes: 2
Views: 705
Reputation: 5145
heyy you can use Quick Menu for giving that menu option. Quick menu provide horizontal and vertical both option with image view. or u have to make your custom.
Upvotes: 1