Iโm working on a chat-related application, in this application I will share information so that by default any email client works fine, in this application I add settings in the settings, which one parameter adds โClear email client settingsโ, suppose that click on it again the default dialog box for the mail option will appear. How to clear email settings in android? Send me any solution.
Intent i = new Intent(Intent.ACTION_SEND); i.setType("text/html"); i.putExtra(Intent.EXTRA_SUBJECT, "Mail from Mobile Application"); String emailbody=""; emailbody=String.format("<html>"+ "<head>"+ "<meta name='viewport' content='width=device-width; initial-scale=1.0; maximum-scale=2.0;'>"+ "</head>"+ "<body> " + "<b>Reference : </b> %s"+"<br><br>" + "</body>"+ "</html>", s_ref); i.putExtra(Intent.EXTRA_TEXT,Html.fromHtml(emailbody)); try { startActivity(Intent.createChooser(i, "Send mail...")); } catch (android.content.ActivityNotFoundException ex) { Toast.makeText(this, "There are no email clients installed.", Toast.LENGTH_SHORT).show(); }
source share