我正在此应用程序中处理与聊天相关的应用程序,将信息共享到电子邮件默认任何邮件客户端,它工作正常,在此应用程序中,我在设置中添加设置,一个选项是添加“清除电子邮件客户端设置”假设再次单击此显示对话框默认选择邮件选项。如何清除 android 中的电子邮件设置?请将任何解决方案发送给我。
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();
}
我相信这不能再做了。自 Gingerbread 以来,Android 不向开发人员提供对名为 clearApplicationUserData(String packageName, learUserDataObserver mClearDataObserver)
的特定方法的访问。因此,如果没有任何非法黑客攻击,您将无法做到这一点。
Source
我是一名优秀的程序员,十分优秀!