Intent filtering does not consider extras when matching, EXTRA_EMAIL is only useful for specifying the recipient once you're in the target application.

Using a "mailto:"; URI with with ACTION_VIEW or ACTION_SENDTO works well for me, and encoding various email parameters right in the URI seems to be more reliable than using extras (== more email clients get this right).

Something like: "mailto:[email protected]?subject=Hello+there&body=How+you+doin";.

This is the relevant portion from the standard email app's manifest:

<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>

-- Kostya

01.03.2011 2:46, TreKing ?????:
On Mon, Feb 28, 2011 at 5:30 PM, Peter Sinnott <[email protected] <mailto:[email protected]>> wrote:

    Iirc SENDTO gave me mail and gmail as alternatives but SEND
    either didn't give me mail or gave me a multitude of options most
    of which were not email specific.


Ah. If that way works, no point in changing, but FYI, I think you need to use this:
http://developer.android.com/reference/android/content/Intent.html#EXTRA_EMAIL
And the type "plaint/text" is also required.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to