Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Context; import android.content.Intent; import android.util.Log; import android.widget.Toast; public class Main { private static final String TAG = "UiUtil"; public static void startEmailIntent(Context context, String emailAddress) { try { Intent intent = new Intent(android.content.Intent.ACTION_SEND); intent.setType("plain/text"); intent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] { emailAddress }); context.startActivity(intent); } catch (Exception ex) { Log.e(TAG, "Error starting email intent.", ex); Toast.makeText(context, "Sorry, we couldn't find any app for sending emails!", Toast.LENGTH_SHORT) .show(); } } }