Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.content.Intent;

import android.net.Uri;

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