1. 调web浏览器
view plaincopy to clipboardprint?
01.Uri myBlogUri = Uri.parse("http://xxxxx.com");
02.returnIt = new Intent(Intent.ACTION_VIEW, myBlogUri);
2. 地图
view plaincopy to clipboardprint?
01.Uri mapUri = Uri.parse("geo:38.899533,-77.036476");
02.returnIt = new Intent(Intent.ACTION_VIEW, mapUri);
3. 调拨打电话界面
view plaincopy to clipboardprint?
01.Uri telUri = Uri.parse("tel:100861");
02.returnIt = new Intent(Intent.ACTION_DIAL, telUri);
4. 直接拨打电话
view plaincopy to clipboardprint?
01.Uri callUri = Uri.parse("tel:100861");
02.returnIt = new Intent(Intent.ACTION_CALL, callUri);
5. 卸载
view plaincopy to clipboardprint?
01.Uri uninstallUri = Uri.fromParts("package", "xxx", null);
02.returnIt = new Intent(Intent.ACTION_DELETE, uninstallUri);
6,安装
view plaincopy to clipboardprint?
01.Uri installUri = Uri.fromParts("package", "xxx", null);
02.returnIt = new Intent(Intent.ACTION_PACKAGE_ADDED, installUri);
7. 播放
view plaincopy to clipboardprint?
01.Uri playUri = Uri.parse("file:///sdcard/download/everything.mp3");
02.returnIt = new Intent(Intent.ACTION_VIEW, playUri);
8. 调用发邮件
view plaincopy to clipboardprint?
01.Uri emailUri = Uri.parse("mailto:xxxx@gmail.com");
02.returnIt = new Intent(Intent.ACTION_SENDTO, emailUri);
9. 发邮件
view plaincopy to clipboardprint?
01.returnIt = new Intent(Intent.ACTION_SEND);
02.String[] tos = { "xxxx@gmail.com" };
03.String[] ccs = { "xxxx@gmail.com" };
04.returnIt.putExtra(Intent.EXTRA_EMAIL, tos);
05.returnIt.putExtra(Intent.EXTRA_CC, ccs);
06.returnIt.putExtra(Intent.EXTRA_TEXT, "body");
07.returnIt.putExtra(Intent.EXTRA_SUBJECT, "subject");
08.returnIt.setType("message/rfc882");
09.Intent.createChooser(returnIt, "Choose Email Client");
10. 发短信
view plaincopy to clipboardprint?
01.Uri smsUri = Uri.parse("tel:100861");
02.returnIt = new Intent(Intent.ACTION_VIEW, smsUri);
03.returnIt.putExtra("sms_body", "yyyy");
04.returnIt.setType("vnd.android-dir/mms-sms");
11. 直接发邮件
view plaincopy to clipboardprint?
01.Uri smsToUri = Uri.parse("smsto://100861");
02.returnIt = new Intent(Intent.ACTION_SENDTO, smsToUri);
03.returnIt.putExtra("sms_body", "yyyy");
12. 发彩信
view plaincopy to clipboardprint?
01.Uri mmsUri = Uri.parse("content://media/external/images/media/23");
02.returnIt = new Intent(Intent.ACTION_SEND);
03.returnIt.putExtra("sms_body", "yyyy");
04.returnIt.putExtra(Intent.EXTRA_STREAM, mmsUri);
05.returnIt.setType("image/png");
最后一步:
startActivity(returnIt);