pjpires
pjpires

Reputation: 342

Android ACTION_SEND/SEND_MULTIPLE recipients (besides EXTRA_EMAIL)

I want to provide support for ACTION_SEND/SEND_MULTIPLE inside my application. I've registered the intent-filter to allow multimedia/plain text to be supported:

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

But now I would like to allow for receiving a recipient where the content should be sent to. Is there something equivalent to the EXTRA_EMAIL to get a different kind of recipient (like a contact number)?

Imagine some app would like to allow for selecting a contact and share an image/text. Is there a way to set/receive a recipient without using a custom Intent?

I'm aware of the SENDTO action, but it specifically says "Send a message...", so I guess it only supports for "sms" and "smsto" schemes.

Thanks!

Upvotes: 1

Views: 440

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007554

Is there something equivalent to the EXTRA_EMAIL to get a different kind of recipient (like a contact number)?

No, insofar as out of the million-plus apps for Android in use today, approximately none will do that. You are welcome to promote your own custom extra and try to convince developers to support it.

Imagine some app would like to allow for selecting a contact and share an image/text.

The flow is that they pick the "image/text" first, then choose an app to share it with, then choose the contact(s) inside of that app (assuming the app has the concept of "contacts").

I'm aware of the SENDTO action, but it specifically says "Send a message...", so I guess it only supports for "sms" and "smsto" schemes.

No, it is also used for mailto: (and not sms AFAIK).

Upvotes: 1

Related Questions