1

I want to send e-mail from my Android app, by starting an ACTION_SEND intent, as described here.

If I don't supply a subject (intent.putExtra(Intent.EXTRA_SUBJECT, "...")), the focus in the e-mail activity will be on the Subject field, which is what I want. But if I do supply a subject, the focus will go directly to the Body, which I don't want.

Is there a way to force the focus to be on the Subject field? Or is this completely out of my control?

Community
  • 1
  • 1
jqno
  • 15,133
  • 7
  • 57
  • 84

1 Answers1

2

If I don't supply a subject (intent.putExtra(Intent.EXTRA_SUBJECT, "...")), the focus in the e-mail activity will be on the Subject field, which is what I want. But if I do supply a subject, the focus will go directly to the Body, which I don't want.

That is the behavior for whatever particular email program you chose. That may or may not be the behavior for whatever email program your users choose. There are many email clients for Android.

Or is this completely out of my control?

It is completely out of your control, insofar as the behavior you describe is not universal. I rather doubt that there is somebody pointing guns at the heads of all email client authors forcing them to implement any particular behavior with respect to focus. Heck, it is entirely possible that an email client might not even have both the subject and the body on the screen at the same time.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • I was afraid of that, but I thought I'd ask anyway, maybe someone would prove me wrong :). Thanks! – jqno Dec 25 '11 at 12:17