3

I am trying to receive the sending whatsapp intent when sharing the conversation via email.I can't make my application appear in the possible applications to share.I need information on how to properly configure my androidmanifest and receive the attachment * .txt.Thanks and I hope I have expressed myself well.

2 Answers2

0

You need an <intent-filter> in your activity that will be handling the email:

<intent-filter>
    <action android:name="android.intent.action.VIEW"/>
    <action android:name="android.intent.action.SENDTO"/>
    <data android:scheme="mailto"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
<intent-filter android:label="@string/app_name">
    <action android:name="android.intent.action.SEND"/>
    <data android:mimeType="*/*"/>
    <category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<intent-filter android:label="@string/app_name">
    <action android:name="android.intent.action.SEND_MULTIPLE"/>
    <data android:mimeType="*/*"/>
    <category android:name="android.intent.category.DEFAULT"/>
</intent-filter>  

This is what the email app uses.

Source: android intent-filter to listen for sent email addresses?

Community
  • 1
  • 1
An SO User
  • 24,612
  • 35
  • 133
  • 221
0

Your application doesn't appear in the chooser because Whatsapp has whitelisted only some packages for the email applications.

For more information, see this answer

FacundoJ
  • 391
  • 4
  • 11