Re: [android-developers] Re: How to open email in app with address

2011-03-01 Thread Kostya Vasilyev
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:user.n...@server.com?subject=Hello+therebody=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 psinn...@gmail.com 
mailto:psinn...@gmail.com 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: How to open email in app with address

2011-03-01 Thread brian purgert
Platamus on anddev had a short tutorial on it if you want to check it out.
On Mar 1, 2011 4:40 AM, Kostya Vasilyev kmans...@gmail.com wrote:

 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:user.n...@server.com
?subject=Hello+therebody=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 psinn...@gmail.com
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 - 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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Re: How to open email in app with address

2011-02-28 Thread Peter Sinnott
How helpful.


A lot of websites say to use ACTION_SEND but I found ACTION_SENDTO
works better.

Intent emailIntent = new Intent(android.content.Intent.ACTION_SENDTO);
emailIntent.setData(Uri.parse(mailto:a...@b.com;));
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, A
Subject );


On Feb 28, 8:44 pm, Justin Anderson magouyaw...@gmail.com wrote:
 http://lmgtfy.com/?q=android+email+intent

 On Mon, Feb 28, 2011 at 1:24 PM, brian purgert brianpurge...@gmail.comwrote:

  I want the person to click on a button and when they click it, it opens up
  their email and my email address is already there.

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

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


Re: [android-developers] Re: How to open email in app with address

2011-02-28 Thread TreKing
On Mon, Feb 28, 2011 at 5:13 PM, Peter Sinnott psinn...@gmail.com wrote:

 A lot of websites say to use ACTION_SEND but I found ACTION_SENDTO works
 better.


Curious: how does it work better?

-
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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to open email in app with address

2011-02-28 Thread Peter Sinnott
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.


On Feb 28, 11:18 pm, TreKing treking...@gmail.com wrote:
 On Mon, Feb 28, 2011 at 5:13 PM, Peter Sinnott psinn...@gmail.com wrote:
  A lot of websites say to use ACTION_SEND but I found ACTION_SENDTO works
  better.

 Curious: how does it work better?

 -
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: How to open email in app with address

2011-02-28 Thread Justin Anderson
* How helpful.*

If the OP isn't going to put much time into the question (i.e. doing some
stuff to try to figure it out first... such as doing a google search,
looking at docs, etc..) then I'm not going to put much time in the answer.



On Mon, Feb 28, 2011 at 4:30 PM, Peter Sinnott psinn...@gmail.com 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.


 On Feb 28, 11:18 pm, TreKing treking...@gmail.com wrote:
  On Mon, Feb 28, 2011 at 5:13 PM, Peter Sinnott psinn...@gmail.com
 wrote:
   A lot of websites say to use ACTION_SEND but I found ACTION_SENDTO
 works
   better.
 
  Curious: how does it work better?
 
 
 -
  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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


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

Re: [android-developers] Re: How to open email in app with address

2011-02-28 Thread TreKing
On Mon, Feb 28, 2011 at 5:30 PM, Peter Sinnott psinn...@gmail.com 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
http://developer.android.com/reference/android/content/Intent.html#EXTRA_EMAILAnd
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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en