Java tutorial
//package com.java2s; //License from project: Open Source License import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; public class Main { public static void showEmailDialog(final Context context, final String subject) { new AlertDialog.Builder(context).setTitle("Email Us").setMessage( "Please send email with As many details as possible. We will look into it as soon as possible. \n\nPlease DO NOT change subject and email address. Continue to Email?") .setPositiveButton(android.R.string.ok, new OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/html"); // intent.putExtra(Intent.EXTRA_EMAIL, R.string.app_email); intent.putExtra(Intent.EXTRA_SUBJECT, subject); intent.putExtra(Intent.EXTRA_TEXT, ""); context.startActivity(Intent.createChooser(intent, "Send Email")); } }).setIcon(android.R.drawable.ic_dialog_info).show(); } }