Start Email sending App via Intent - Android android.content.pm

Android examples for android.content.pm:App

Description

Start Email sending App via Intent

Demo Code

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

public class Main {

  public static void sendEmail(Context context, String receiver) {
    Intent intent = new Intent(Intent.ACTION_SENDTO);
    intent.setData(Uri.parse("mailto:" + receiver));
    context.startActivity(intent);/*  w  w  w.j  a  v  a2s  . c om*/
  }

}

Related Tutorials