Hi I am developing an android application in which a form has to be submitted over email. my code is as follows
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("text/plain");
i.putExtra(Intent.EXTRA_EMAIL , new String[]{"mail id"});
i.putExtra(Intent.EXTRA_SUBJECT, "Subjec");
i.putExtra(Intent.EXTRA_TEXT ,"Hi"
startActivity(i);
When I click submit on the form it is triggering a spinner from which user has to select email to goto email. The problem it is showing hell lot of other unnecessary options such as bluetooth, colornote etc... I want only email or gmail to be shown or a better way it should directly goto email application
Please kindly give me your valuable advice.
Thanking you Yours sincerely Chinnikrishna
Hi I found the answer to my question I need to add
i.setType("application/octet-stream");
Then it is giving me only gmail and email :-)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.