Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Intent;

import android.net.Uri;

public class Main {
    public static Intent newSendToIntent(String emailAddress, String subject, String contentBody) {
        return new Intent(Intent.ACTION_SENDTO).setData(Uri.parse("mailto:" + Uri.encode(emailAddress) + "?subject="
                + Uri.encode(subject) + "&body=" + Uri.encode(contentBody)));
    }
}