Advertisement

How to open and send email using the native client directly from your Android App? - Source Code

How to open and send email using the native client directly from your Android App? - Source Code In this short video, it shows the steps to create and Email client opening App. In this simple App, it just has one button. Clicking on that button it opens up the in-built default (native) email client of the phone.

The use case of this concept will be to add a contact button in your business App where when a user clicks on that contact button, it opens up the email client on their phone with your business email ID already fed in.

We hope you like this video. For any query, suggestions or appreciations we will be glad to hear from you at: programmerworld1990@gmail.com


Source Code:

package com.example.myemailclientopeningapp;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}

public void EmailButton(View view){
startActivity(new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:abc@gmail.com")));
}
}

Android,smartphone,phone,button,application,electronic,mail,message,client,server,google,gmail,outlook,desktop,software,send,receive,inbox,outbos,outbox,sent,at the rate of,rate,compose,import,package,receipt,

Post a Comment

0 Comments