Android Launch Email
Launch Email:
To start the default email application on an Android device with some sample email information to be entered are known as explicit intents.
Example:
// AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".LaunchEmailExample"
android:padding="16dp"
android:gravity="center"
android:background="@color/colorOrange"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Click on button to Launch Email"
android:textColor="@color/colorWhite"
android:textSize="30sp"
android:gravity="center"/>
<Button
android:id="@+id/click"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Launch Email"
android:textColor="@color/colorWhite"
android:textSize="16dp"
android:layout_marginTop="20dp"
android:background="@color/colorPrimaryDark"
/>
</LinearLayout>
Output