I am interested in making my app appear in the apps list shown when I use the "email conversation" feature in WhatsApp.
When logging my phone while using the "email conversation" WhatsApp feature I can see a SEND_MULTIPLE
intent being received by Gmail:
I/ActivityManager( 859): START u0 {act=android.intent.action.SEND_MULTIPLE typ=text/* flg=0xb080001 pkg=com.google.android.gm cmp=com.google.android.gm/.ComposeActivityGmail (has clip) (has extras)} from uid 10114 on display 0
So I suppose I need to add an intent filter for the SEND_MULTIPLE
action in my app manifest.
Currently my AndroidManifest.xml
is:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.xxx.xxx" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<activity
android:name=".MyActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar" >
<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.SENDTO" />
<data android:scheme="mailto" />
<category android:name="android.intent.category.DEFAULT" />
</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>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<data android:mimeType="*/*" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="*/*" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
However, when I run my app in my phone via Android Studio, it does not show up when trying to export my WhatsApp conversation. Conversely, it shows up in the app chooser when trying to share a picture of my gallery.
What am I missing in the AndroidManifest that prevents my app from being shown when emailing my WhatsApp conversations? Is there something else I need to announce to the OS to make my app elligible for appearing in the app chooser?
I have tried to install K-9 Mail app. Just after installing it, it does not appear in the app chooser when emailing a chat in WhatsApp, but after setting up an account in K-9, it appears in the chooser. Is it possible that K9 announces to the OS that it is ready for sending emails?
Thank you!