Reputation: 1843
I am working on an email app where I have specified intent-filters on an activity so that other apps can share things from it. Every other apps show my email app intent while sharing but WhatsApp does not show it when I share Email Conversation.
My Actvity is defined in AndroidManifest as shown below:
<activity
android:name="com.test.myapp.ComposeActivity"
android:configChanges="orientation|keyboard|screenSize|screenLayout" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="mailto" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="mailto" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
How can I make my app visible while sharing through WhatsApp?
Upvotes: 2
Views: 828
Reputation: 2725
Figured out it, props to this answer
Turns out that WhatsApp is whitelisting the packages that show up on the chooser. Some whitelisted email clients are outlook, k9 (didn't actually work for me so that may be outdated) and gmail/android email.
One workaround is to have the same application id as one of these whitelisted packages (I've verified this still works) but obviously you won't be able to publish to the app store. If you were desperate you could potentially create another app and bundle the apk into your assets/raw and have them install it from there. This app could share the domain of one of the whitelisted packages and securely transfer this intent to your main app*.
I do not advocate for this approach, just saying it's an option.
Upvotes: 1