[{"data":1,"prerenderedAt":207},["ShallowReactive",2],{"public-settings":3,"post-android-programatically-sending-email":15,"article-code-phafy5":206},{"site_title":4,"tagline":5,"site_url":6,"footer_text":5,"social_twitter":7,"social_github":7,"social_youtube":7,"social_linkedin":7,"social_mastodon":7,"og_image":8,"comments_enabled":9,"ads_mode":10,"ads_publisher_id":7,"ads_adtest":11,"ads_in_article_enabled":9,"ads_in_article_slot":7,"ads_in_article_paragraph":12,"ads_end_of_post_enabled":9,"ads_end_of_post_slot":7,"ads_feed_enabled":9,"ads_feed_slot":7,"ads_feed_every":13,"ads_sidebar_enabled":9,"ads_sidebar_slot":7,"ads_consent_enabled":11,"seo_enabled":9,"llms_enabled":9,"verification_google":7,"verification_bing":7,"performance_lcp_preload":9,"pwa_enabled":9,"bookmarks_enabled":9,"comments_moderation":9,"home_carousel_featured":9,"home_carousel_latest":9,"home_carousel_latest_mode":14,"home_carousel_series":9,"home_carousel_topics":9},"Android Learner","Practical Android development, explained clearly.","https:\u002F\u002Fwww.androidlearner.com","","\u002Fmedia\u002Fseed\u002Fcover-llm.webp","1","demo","0","2","3","latest",{"post":16,"comments":205},{"id":17,"title":18,"slug":19,"path":20,"excerpt":21,"cover_image":22,"cover_media_id":23,"status":24,"publish_at":25,"reading_time":26,"seo_title":18,"seo_description":21,"og_image":22,"canonical_url":27,"noindex":28,"featured":28,"faq":29,"howto":30,"review_note":30,"submitted_at":30,"reviewed_at":30,"category":31,"series":30,"tags":36,"author":44,"created_at":25,"updated_at":48,"body_md":49,"body_html":50,"related":51},9,"Android  sending email from code","android-programatically-sending-email","\u002F2020\u002F01\u002Fandroid-programatically-sending-email.html","Sending email from the android app is necessary task. It helps your users to easily contact you.","\u002Fmedia\u002Fseed\u002Fimported\u002F2020-01-android-programatically-sending-email-01.webp",39,"published","2020-01-18 09:04:00",1,"https:\u002F\u002Fwww.androidlearner.com\u002F2020\u002F01\u002Fandroid-programatically-sending-email.html",false,[],null,{"id":32,"name":33,"slug":34,"description":35},6,"Android Development","android-development","Tutorials and guides imported from the original Android Learner blog.",[37,41],{"id":38,"name":39,"slug":40,"description":30},28,"Android","android",{"id":42,"name":43,"slug":43,"description":30},29,"email",{"id":26,"name":45,"username":46,"avatar":30,"profile_path":47},"Super Admin","superadmin","\u002Fu\u002Fsuperadmin","2020-01-18 09:06:15","# Android Sending Email\n\n![thankyoudribble](\u002Fmedia\u002Fseed\u002Fimported\u002F2020-01-android-programatically-sending-email-01.webp)\n\nSending email from the android app is necessary task. It helps your users to easily contact you.\n\nFor sending email we will use our app to share data to mail client.(like Gmail android app).\n\nThe [Intent](https:\u002F\u002Fwww.tutlane.com\u002Ftutorial\u002Fandroid\u002Fandroid-intents-implicit-explicit) object in android with proper action (**ACTION_SEND**) and data will help us to launch the available email clients to send an email in our application.\n\n```java\nIntent emailIntent = new Intent(Intent.ACTION_SEND);\n```\n\nIn android, Intent is a messaging object which is used to request an action from another app component such as activities, services, broadcast receivers and content providers.\n\nTo send an email you need to specify mailto: as URI using setData() method and data type will be to text\u002Fplain using setType() method as follows −\n\n```java\nemailIntent.setData(Uri.parse(\"mailto:\"));\nemailIntent.setType(\"text\u002Fplain\");\nemailIntent.putExtra(Intent.EXTRA_EMAIL  , new String[]{\"androidlearner@androidlearner.com\"});\nemailIntent.putExtra(Intent.EXTRA_SUBJECT, \"subject\");\nemailIntent.putExtra(Intent.EXTRA_TEXT   , \"Message Body\");\n```\n\nBelow is the sample code to send the mail.\n\n> call this method inside class extending activity\n\n```java\n public void sendEmail() {\n\n      String[] TO = {\"test@gmail.com\",\"user2@yahoo.com\"};\n      String[] CC = {\"\"};\n      Intent emailIntent = new Intent(Intent.ACTION_SEND);\n\n      emailIntent.setData(Uri.parse(\"mailto:\"));\n      emailIntent.setType(\"text\u002Fplain\");\n      emailIntent.putExtra(Intent.EXTRA_EMAIL, TO);\n      emailIntent.putExtra(Intent.EXTRA_CC, CC);\n      emailIntent.putExtra(Intent.EXTRA_SUBJECT, \"Your subject\");\n      emailIntent.putExtra(Intent.EXTRA_TEXT, \"Email message goes here\");\n\n      try {\n         startActivity(Intent.createChooser(emailIntent, \"Send mail...\"));\n         finish();\n         Log.i(\"Finished sending email...\", \"\");\n      } catch (android.content.ActivityNotFoundException ex) {\n         Toast.makeText(MainActivity.this, \"There is no email client installed.\", Toast.LENGTH_SHORT).show();\n      }\n   }\n```\n","\u003Ch1>Android Sending Email\u003C\u002Fh1>\n\u003Cp>\u003Cimg src=\"\u002Fmedia\u002Fseed\u002Fimported\u002F2020-01-android-programatically-sending-email-01.webp\" alt=\"thankyoudribble\" \u002F>\u003C\u002Fp>\n\u003Cp>Sending email from the android app is necessary task. It helps your users to easily contact you.\u003C\u002Fp>\n\u003Cp>For sending email we will use our app to share data to mail client.(like Gmail android app).\u003C\u002Fp>\n\u003Cp>The \u003Ca href=\"https:\u002F\u002Fwww.tutlane.com\u002Ftutorial\u002Fandroid\u002Fandroid-intents-implicit-explicit\">Intent\u003C\u002Fa> object in android with proper action (\u003Cstrong>ACTION_SEND\u003C\u002Fstrong>) and data will help us to launch the available email clients to send an email in our application.\u003C\u002Fp>\n\u003Cpre class=\"code-block\" data-lang=\"java\">\u003Ccode class=\"language-java\">Intent emailIntent = new Intent(Intent.ACTION_SEND);\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>In android, Intent is a messaging object which is used to request an action from another app component such as activities, services, broadcast receivers and content providers.\u003C\u002Fp>\n\u003Cp>To send an email you need to specify mailto: as URI using setData() method and data type will be to text\u002Fplain using setType() method as follows −\u003C\u002Fp>\n\u003Cpre class=\"code-block\" data-lang=\"java\">\u003Ccode class=\"language-java\">emailIntent.setData(Uri.parse(&quot;mailto:&quot;));\nemailIntent.setType(&quot;text\u002Fplain&quot;);\nemailIntent.putExtra(Intent.EXTRA_EMAIL  , new String[]{&quot;androidlearner@androidlearner.com&quot;});\nemailIntent.putExtra(Intent.EXTRA_SUBJECT, &quot;subject&quot;);\nemailIntent.putExtra(Intent.EXTRA_TEXT   , &quot;Message Body&quot;);\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Below is the sample code to send the mail.\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>call this method inside class extending activity\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Cpre class=\"code-block\" data-lang=\"java\">\u003Ccode class=\"language-java\"> public void sendEmail() {\n\n      String[] TO = {&quot;test@gmail.com&quot;,&quot;user2@yahoo.com&quot;};\n      String[] CC = {&quot;&quot;};\n      Intent emailIntent = new Intent(Intent.ACTION_SEND);\n\n      emailIntent.setData(Uri.parse(&quot;mailto:&quot;));\n      emailIntent.setType(&quot;text\u002Fplain&quot;);\n      emailIntent.putExtra(Intent.EXTRA_EMAIL, TO);\n      emailIntent.putExtra(Intent.EXTRA_CC, CC);\n      emailIntent.putExtra(Intent.EXTRA_SUBJECT, &quot;Your subject&quot;);\n      emailIntent.putExtra(Intent.EXTRA_TEXT, &quot;Email message goes here&quot;);\n\n      try {\n         startActivity(Intent.createChooser(emailIntent, &quot;Send mail...&quot;));\n         finish();\n         Log.i(&quot;Finished sending email...&quot;, &quot;&quot;);\n      } catch (android.content.ActivityNotFoundException ex) {\n         Toast.makeText(MainActivity.this, &quot;There is no email client installed.&quot;, Toast.LENGTH_SHORT).show();\n      }\n   }\n\u003C\u002Fcode>\u003C\u002Fpre>\n",[52,92,131,169],{"id":53,"title":54,"slug":55,"path":56,"excerpt":57,"cover_image":58,"cover_media_id":59,"status":24,"publish_at":60,"reading_time":61,"seo_title":62,"seo_description":63,"og_image":58,"canonical_url":64,"noindex":28,"featured":28,"faq":65,"howto":30,"review_note":30,"submitted_at":30,"reviewed_at":30,"category":72,"series":30,"tags":77,"author":89,"created_at":90,"updated_at":91},22,"Google Play's 16 KB Page Size Rule: What to Fix Before 1 February 2027","android-16kb-page-size-google-play-deadline","\u002Fposts\u002Fandroid-16kb-page-size-google-play-deadline","Apps that target API 35+ and ship native code must support 16 KB pages before 1 February 2027 or Play will block updates. Pure Kotlin and Java apps are already compatible.","\u002Fmedia\u002F2026\u002F11\u002F723c07ce07ee95c5.webp",62,"2026-11-25 02:00:00",8,"Android 16 KB page size: Play deadline 1 February 2027","If your app targets API 35+ and ships native code, Google Play will block updates after 1 February 2027 unless you support 16 KB pages. How to check, rebuild, and test.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fandroid-16kb-page-size-google-play-deadline",[66,69],{"question":67,"answer":68},"Does a pure Kotlin or Java app need a native rebuild?","No. Android Developers say that if the app and all of its libraries are written only in Java or Kotlin, it already supports 16 KB devices. They still recommend testing on a 16 KB emulator image.",{"question":70,"answer":71},"Will Google remove my app from Play on 1 February 2027 if I miss the deadline?","The official compatibility section says you will not be able to release updates that do not support 16 KB pages. It does not say existing listings are removed. Check Play Console for the wording on your own app, and re-read the page-sizes guide for the current date.",{"id":73,"name":74,"slug":75,"description":76},5,"Performance","performance","Startup, frames, and profiles.",[78,79,83,87],{"id":38,"name":39,"slug":40,"description":30},{"id":80,"name":81,"slug":82,"description":30},49,"Google Play","google-play",{"id":84,"name":85,"slug":86,"description":30},50,"NDK","ndk",{"id":88,"name":74,"slug":75,"description":30},12,{"id":26,"name":45,"username":46,"avatar":30,"profile_path":47},"2026-11-24 19:51:51","2026-11-24 19:53:15",{"id":93,"title":94,"slug":95,"path":96,"excerpt":97,"cover_image":98,"cover_media_id":99,"status":24,"publish_at":100,"reading_time":32,"seo_title":101,"seo_description":102,"og_image":98,"canonical_url":103,"noindex":28,"featured":28,"faq":104,"howto":30,"review_note":30,"submitted_at":30,"reviewed_at":30,"category":111,"series":30,"tags":116,"author":128,"created_at":129,"updated_at":130},21,"Type-Safe Deep Links in Jetpack Navigation 3","jetpack-navigation-3-type-safe-deep-links","\u002Fposts\u002Fjetpack-navigation-3-type-safe-deep-links","Navigation 3 1.2 turns incoming URIs into typed NavKeys. This tutorial covers intent filters, UriDeepLinkMatcher, custom serializers, and synthetic back stacks.","\u002Fmedia\u002F2026\u002F11\u002F6efbb3f253329bad.webp",60,"2026-11-25 01:30:00","Type-safe deep links with Jetpack Navigation 3 1.2","Map URIs to @Serializable NavKeys with UriDeepLinkMatcher, Kotlin Serialization, and DeepLinkSerializer in Navigation 3 1.2.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fjetpack-navigation-3-type-safe-deep-links",[105,108],{"question":106,"answer":107},"Does Navigation 3 replace AndroidManifest intent filters?","No. Navigation 3 1.2 matches a DeepLinkRequest after the system has already delivered an Intent to your activity. You still have to declare intent filters for the URIs you handle.",{"question":109,"answer":110},"What happens if a deep link argument has the wrong type?","UriDeepLinkMatcher.match returns null for ordinary parse misses, such as a non-integer value for an Int property, so another matcher can still run. Unsupported key shapes like Map arguments can throw at match time.",{"id":112,"name":113,"slug":114,"description":115},4,"Architecture","architecture","App architecture and data layers.",[117,118,120,124],{"id":38,"name":39,"slug":40,"description":30},{"id":119,"name":113,"slug":114,"description":30},48,{"id":121,"name":122,"slug":123,"description":30},24,"Jetpack","jetpack",{"id":125,"name":126,"slug":127,"description":30},47,"Navigation","navigation",{"id":26,"name":45,"username":46,"avatar":30,"profile_path":47},"2026-11-24 19:51:50","2026-11-24 19:53:13",{"id":132,"title":133,"slug":134,"path":135,"excerpt":136,"cover_image":137,"cover_media_id":138,"status":24,"publish_at":139,"reading_time":61,"seo_title":140,"seo_description":141,"og_image":137,"canonical_url":142,"noindex":28,"featured":28,"faq":143,"howto":30,"review_note":30,"submitted_at":30,"reviewed_at":30,"category":150,"series":30,"tags":155,"author":166,"created_at":167,"updated_at":168},20,"Material 2 Is Deprecated: Move to Material 3 1.5 and TextFieldState","migrate-compose-material-2-to-material-3-1-5","\u002Fposts\u002Fmigrate-compose-material-2-to-material-3-1-5","Material 3 1.5.0 is stable and Material 2 is no longer actively maintained. This guide covers the theme swap, component move, and TextFieldState migration.","\u002Fmedia\u002F2026\u002F11\u002Faf355ed5e362f80d.webp",57,"2026-11-25 01:00:00","Migrate from Compose Material 2 to Material 3 1.5","Compose Material 2 is no longer maintained. Adopt Material 3 1.5.0 and replace deprecated value-based TextField APIs with TextFieldState.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fmigrate-compose-material-2-to-material-3-1-5",[144,147],{"question":145,"answer":146},"Is Material 2 removed from the Compose BOM?","No. It is deprecated and no longer actively maintained, but existing Material 2 screens still compile. Plan the migration if you want ongoing bug fixes and the current design language.",{"question":148,"answer":149},"Are Material 3 value-based TextField overloads deprecated in 1.5.0?","No. Android Developers say those Material 3 overloads are not deprecated yet in 1.5.0, but they already recommend the state-based TextField and OutlinedTextField APIs. Value-based BasicTextField and Material 2 TextField are deprecated in Compose 1.13.",{"id":151,"name":152,"slug":153,"description":154},2,"Jetpack Compose","jetpack-compose","Modern Android UI.",[156,157,160,162],{"id":38,"name":39,"slug":40,"description":30},{"id":112,"name":158,"slug":159,"description":30},"Compose","compose",{"id":161,"name":152,"slug":153,"description":30},18,{"id":163,"name":164,"slug":165,"description":30},46,"Material 3","material-3",{"id":26,"name":45,"username":46,"avatar":30,"profile_path":47},"2026-11-24 19:51:49","2026-11-24 19:53:11",{"id":170,"title":171,"slug":172,"path":173,"excerpt":174,"cover_image":175,"cover_media_id":176,"status":24,"publish_at":177,"reading_time":178,"seo_title":179,"seo_description":180,"og_image":175,"canonical_url":181,"noindex":28,"featured":28,"faq":182,"howto":30,"review_note":30,"submitted_at":30,"reviewed_at":30,"category":189,"series":30,"tags":190,"author":202,"created_at":203,"updated_at":204},19,"What's New in Jetpack Compose 1.13 (November 2026)","jetpack-compose-1-13-flexbox-grid-progressive-blur","\u002Fposts\u002Fjetpack-compose-1-13-flexbox-grid-progressive-blur","Compose 1.13 is stable in BOM 2026.11.01. Here is how to upgrade, when to use FlexBox and Grid, and what progressive blur and the new deprecations actually mean.","\u002Fmedia\u002F2026\u002F11\u002F6fab1724acc6e8e3.webp",54,"2026-11-25 00:30:00",7,"Jetpack Compose 1.13: FlexBox, Grid, and Progressive Blur","Upgrade to Compose BOM 2026.11.01. Stable FlexBox and Grid, progressive blur, PolygonShape, and the Kotlin 2.2 \u002F compileSdk 37.1 requirements.","https:\u002F\u002Fwww.androidlearner.com\u002Fposts\u002Fjetpack-compose-1-13-flexbox-grid-progressive-blur",[183,186],{"question":184,"answer":185},"Do I need Kotlin 2.2 to use Compose 1.13?","Yes. The official 18 November 2026 Compose release post requires Kotlin 2.2 or newer and compileSdk 37.1 when you upgrade to Compose BOM 2026.11.01.",{"question":187,"answer":188},"Should I replace FlowRow and FlowColumn immediately?","Not necessarily. Android Developers say FlexBox supersedes the Flow layouts and recommend FlexBox for new code. Existing Flow call sites still compile; move them when you next touch those screens.",{"id":151,"name":152,"slug":153,"description":154},[191,192,193,197,201],{"id":38,"name":39,"slug":40,"description":30},{"id":112,"name":158,"slug":159,"description":30},{"id":194,"name":195,"slug":196,"description":30},44,"FlexBox","flexbox",{"id":198,"name":199,"slug":200,"description":30},45,"Grid","grid",{"id":161,"name":152,"slug":153,"description":30},{"id":26,"name":45,"username":46,"avatar":30,"profile_path":47},"2026-11-24 19:51:47","2026-11-24 19:53:09",[],"\u003Ch1>Android Sending Email\u003C\u002Fh1>\n\u003Cp>\u003Cimg src=\"\u002Fmedia\u002Fseed\u002Fimported\u002F2020-01-android-programatically-sending-email-01.webp\" alt=\"thankyoudribble\" \u002F>\u003C\u002Fp>\n\u003Cp>Sending email from the android app is necessary task. It helps your users to easily contact you.\u003C\u002Fp>\n\u003Cp>For sending email we will use our app to share data to mail client.(like Gmail android app).\u003C\u002Fp>\n\u003Cp>The \u003Ca href=\"https:\u002F\u002Fwww.tutlane.com\u002Ftutorial\u002Fandroid\u002Fandroid-intents-implicit-explicit\">Intent\u003C\u002Fa> object in android with proper action (\u003Cstrong>ACTION_SEND\u003C\u002Fstrong>) and data will help us to launch the available email clients to send an email in our application.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-lang=\"java\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">java\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">Intent emailIntent \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> new\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> Intent\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(Intent.ACTION_SEND);\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>In android, Intent is a messaging object which is used to request an action from another app component such as activities, services, broadcast receivers and content providers.\u003C\u002Fp>\n\u003Cp>To send an email you need to specify mailto: as URI using setData() method and data type will be to text\u002Fplain using setType() method as follows −\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-lang=\"java\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">java\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">emailIntent.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">setData\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(Uri.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">parse\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"mailto:\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">));\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">emailIntent.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">setType\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"text\u002Fplain\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">emailIntent.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">putExtra\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(Intent.EXTRA_EMAIL  , \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">new\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> String\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">[]{\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"androidlearner@androidlearner.com\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">});\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">emailIntent.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">putExtra\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(Intent.EXTRA_SUBJECT, \u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"subject\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">emailIntent.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">putExtra\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(Intent.EXTRA_TEXT   , \u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"Message Body\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">);\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n\u003Cp>Below is the sample code to send the mail.\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>call this method inside class extending activity\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Cdiv class=\"code-block\" data-lang=\"java\">\u003Cdiv class=\"code-block__header\">\u003Cspan class=\"code-block__lang\">java\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"code-block__copy\" aria-label=\"Copy code\">Copy\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"code-block__body\">\u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\"> public\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> void\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> sendEmail\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">() {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">      String\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">[] TO \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> {\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"test@gmail.com\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">,\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"user2@yahoo.com\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">};\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">      String\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">[] CC \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> {\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">};\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">      Intent emailIntent \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"color:#F97583\"> new\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\"> Intent\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(Intent.ACTION_SEND);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">      emailIntent.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">setData\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(Uri.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">parse\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"mailto:\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">));\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">      emailIntent.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">setType\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"text\u002Fplain\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">      emailIntent.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">putExtra\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(Intent.EXTRA_EMAIL, TO);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">      emailIntent.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">putExtra\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(Intent.EXTRA_CC, CC);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">      emailIntent.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">putExtra\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(Intent.EXTRA_SUBJECT, \u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"Your subject\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">      emailIntent.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">putExtra\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(Intent.EXTRA_TEXT, \u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"Email message goes here\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">      try\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">         startActivity\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(Intent.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">createChooser\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(emailIntent, \u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"Send mail...\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">));\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">         finish\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">();\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">         Log.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">i\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"Finished sending email...\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">      } \u003C\u002Fspan>\u003Cspan style=\"color:#F97583\">catch\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\"> (android.content.ActivityNotFoundException \u003C\u002Fspan>\u003Cspan style=\"color:#FFAB70\">ex\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">         Toast.\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">makeText\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">(MainActivity.this, \u003C\u002Fspan>\u003Cspan style=\"color:#9ECBFF\">\"There is no email client installed.\"\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">, Toast.LENGTH_SHORT).\u003C\u002Fspan>\u003Cspan style=\"color:#B392F0\">show\u003C\u002Fspan>\u003Cspan style=\"color:#E1E4E8\">();\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">      }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">   }\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\n",1795550404302]