Android Tutorial 64 - Sending Emails

Опубликовано: 25 Март 2014
на канале: Code Here Now
16,969
45

This is an excerpt from Learn by Doing - Android for Beginners on Udemy.
https://www.udemy.com/learn-by-doing-...

Learn how to send an email using an intent.

Things to Remember
-----------------------------
1. Intent action to be used is Intent.ACTION_SEND.

2. Set the type by calling the Intent.setType(String) method to set the MIME type, which is message/rfc822.

3. For specifying the recipients' email addresses use a String[] containing an array of email IDs for the extra Intent.EXTRA_EMAIL.

4. Use the Intent.EXTRA_SUBJECT to mention the subject of your email.

5. The Intent.EXTRA_TEXT extra allows you to include the email body.

6. You can use the Intent.EXTRA_CC and Intent.EXTRA_BCC to specify the list of email addresses for recipients who you want to CC or BCC the email.

7. Wrap your Context.startActivity(Intent) call inside a try... catch block to avoid exceptions on devices that do not have an email client.


Смотрите видео Android Tutorial 64 - Sending Emails онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Code Here Now 25 Март 2014, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 16,969 раз и оно понравилось 45 людям.