Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器

首页 / 操作系统 / Linux / Android应用中可以调用的系统Activity

Android系统内置了多个公共的activity,其他应用可以很方便的调用这些activity,而不用自己去实现。几次都用到了这部分知识,现在总结一些,方便以后参考。1、拨号界面:Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:123456789"));startActivity(callIntent);2、将电话号传入到拨号程序Intent dialIntent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:123456789"));startActivity(dialIntent);3、调用拨号程序Intent touchDialerIntent = new Intent(“coom.android.hone.action.TOUCH_DIALER”);startActivity(touchDialerIntent);4、浏览网页Intent webIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.linuxidc.com"));startActivity(webIntent);5、向email客户端传递地址Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:123@123.com"));startActivity(emailIntent);6、还可以直接将邮件内容发送到邮件客户端,暂时没用到7、查看联系人Intent contactIntent = new Intent(“com.android.cantacts.action.LIST_CONTACTS”));startActivity(contactIntent);8、显示系统设置界面Intent settingIntent = new Intent(“com.”));startActivity(contactIntent);推荐阅读:Android的Activity生命周期 http://www.linuxidc.com/Linux/2013-09/90130.htmAndroid基础总结篇之一:Activity生命周期 http://www.linuxidc.com/Linux/2013-09/90129.htmActivity状态的保存与恢复 http://www.linuxidc.com/Linux/2013-05/84573.htmAndroid 的Activity和Service之间的通信 http://www.linuxidc.com/Linux/2013-05/84331.htmAndroid使用自定义透明Dialog样式的Activity  http://www.linuxidc.com/Linux/2013-04/82182.htm更多Android相关信息见Android 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=11