That would happen because Gmail is the only app on the device that knows how to execute the intent you have created.
On Mon, Feb 2, 2009 at 11:27 AM, Alexey <avolo...@gmail.com> wrote: > > Hi all, i'm trying to display a choice to send a text via email/sms. > public void onClick(View v) { > Intent sendIntent = new Intent(Intent.ACTION_SEND); > sendIntent.putExtra(Intent.EXTRA_TEXT, Body); > sendIntent.putExtra(Intent.EXTRA_SUBJECT,Title); > //sendIntent.setType("plain/text"); > sendIntent.setType("message/rfc822"); > try { > > getContext().startActivity(Intent.createChooser(sendIntent, > getContext().getText(R.string.share_this_story))); > } catch (android.content.ActivityNotFoundException ex) { > Toast.makeText(getContext(), "Can't share", > Toast.LENGTH_SHORT).show > (); > } > } > > and it uses my gmail account as default for this action. I'd like to > have a dialog with options of > gmail, imap mail ( if setup) and messaging) ( kind of like share > pictures ). I thought that wrapping action_send in Chooser will give > me that. But i'm defaulting to gmail. > Permission to send sms is set. > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---