StupidBeauty
Read times:779Posted at:Mon Jul 29 18:34:16 2013
- no title specified

转载 “No Activity found to handle Intent” while emailing data

想要弹出系统的邮件界面时,常规做法是直接使用一个intent来启动那个界面。但是在系统里未安装任何邮件客户端软件时,那种做法会抛出异常而引起自己的程序崩溃。解决办法是, 以Intent.createChooser的形式来调用邮件客户端,这样会显示一个选择框,由用户来选择使用哪个客户端来发送邮件,而即使系统没有任何邮件客户端,在此选择界面上也会告之用户。

http://stackoverflow.com/questions/11517563/no-activity-found-to-handle-intent-while-emailing-data

亮点:

Call the StartActivity method in the following way:

startActivity(Intent.createChooser(emailIntent,

"Send Email Using: "));

If System do not find any eamil application, A nice Dialog will be shown:

张柏芝

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4