Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Context;

import android.content.Intent;

import android.net.Uri;

public class Main {
    /**
     * use for sending mail to any id
     *
     * @param mContext context
     * @param mailID   email id of whom to send mail
     */
    public static void sendMail(Context mContext, String mailID) {
        Uri uri = Uri.parse("mailto:" + mailID);
        Intent intent = new Intent(Intent.ACTION_SENDTO, uri);
        mContext.startActivity(intent);
    }
}