Java – How to open gmail in Android

How to open gmail in Android… here is a solution to the problem.

How to open gmail in Android

I just want to open the Gmail app through my app and want to set up emails, subjects, and messages through my app.

I tried GmailService, but it doesn’t support Bcc or CC emails.

    .withUsername("[email protected]")
    .withMailto("[email protected]")
    .withSubject("this is the subject")
    .withBody("this is the body")
    .withOnSuccessCallback(new BackgroundMail.OnSuccessCallback() {
        public void onSuccess() {
            do some magic
    }).withOnFailCallback(new BackgroundMail.OnFailCallback() {
        public void onFail() {
            do some magic

I want to use the Bcc and CC features along with attachments, subjects, and messages.


Email for any application

Intent email= new Intent(Intent.ACTION_SENDTO);
                email.setData(Uri.parse("mailto:[email protected]"));
                email.putExtra(Intent.EXTRA_SUBJECT, "Subject");
                email.putExtra(Intent.EXTRA_TEXT, "My Email message");

Related Problems and Solutions