Intent跳转到系统应用中的拨号界面、联系人界面、短信界面
来源:互联网 发布:mac office 2016 kms 编辑:程序博客网 时间:2024/05/01 05:54
现在开发中的功能需要直接跳转到拨号、联系人、短信界面等等,查找了很多资料,自己整理了一下。
1、跳转到拨号界面,代码如下:
1)直接拨打
Intent intentPhone = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber));
startActivity(intentPhone);
- 2)跳转到拨号界面
Intent intent = newIntent(Intent.ACTION_DIAL,Uri.parse("tel:" + phoneNumber));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);2、跳转到联系人页面,使用一下代码:
- Intent intentPhone = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber));
- startActivity(intentPhone);
- Intent intentPhone = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber));
现在开发中的功能需要直接跳转到拨号、联系人、短信界面等等,查找了很多资料,自己整理了一下。
//安装已经存在的apk
String filePath="mnt/sdcard/abc.apk";
Intent intent = new
intent.setDataAndType(Uri.parse("file://" + filePath),
startActivity(intent);//直接跳到安装页面,但是还要点击按钮确定安装,还是取消安装
//卸载某应用
String packageName="org.adw.launcher2"
Uri packageUri = Uri.parse("package:"+packageName);//包名,指定该应用
Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageUri);
startActivity(uninstallIntent);
//查看某一应用程序的信息
Intent intent=new Intent("android.settings.APPLICATION_DETAILS_SETTINGS", uri);
startActivity(intent);
2.浏览网页某一具体网址
//加下面这句话就是启动系统自带的浏览器打开上面的网址,
intent.setClassName("com.android.browser", "com.android.browser.BrowserActivity");
//系统
Intent intent=new Intent();
startActivity(intent);
//回到桌面吗
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
startActivity(intent);
//系统
Intent intent= new Intent(Intent.ACTION_DIAL);
intent.setClassName("com.android.contacts","com.android.contacts.DialtactsActivity");
startActivity(intent);
//系统 通话记录
Intent intent =new Intent();
intent.setAction("android.intent.action.CALL_BUTTON");
startActivity(intent);
//拨号
//启动拨号界面,指定了类名
Intent intent= new Intent("android.intent.action.DIAL");
startActivity(intent);
//系统
Intent intent001 = new Intent();
intent001.setClassName("com.android.contacts","com.android.contacts.activities.PeopleActivity");
startActivity(intent001);
//系统
Intent intent002=new Intent();
intent002.setClassName("com.android.quicksearchbox", "com.android.quicksearchbox.SearchActivity");
startActivity(intent002);
//启动短信收件箱的界面,指定了包名,类名
intent4.setClassName("com.android.mms","com.android.mms.ui.ConversationList");
startActivity(intent4);
Intent intent = new Intent();
Intent intent=newIntent(Intent.ACTION_EDIT,Uri.parse("content://com.android.contacts/contacts/"+"1"));
startActivity(intent);
Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
intent.setType("vnd.android.cursor.item/person");
intent.setType("vnd.android.cursor.item/contact");
intent.setType("vnd.android.cursor.item/raw_contact");
intent.putExtra(android.provider.ContactsContract.Intents.Insert.NAME, name);
intent.putExtra(android.provider.ContactsContract.Intents.Insert.COMPANY,company);
intent.putExtra(android.provider.ContactsContract.Intents.Insert.PHONE, tel);
intent.putExtra(android.provider.ContactsContract.Intents.Insert.PHONE_TYPE, 3);
//启动短信收件箱的界面,指定了包名,类名
Intent intent = new Intent();
intent.setClassName("com.android.mms","com.android.mms.ui.ConversationList");
startActivity(intent);
//启动编辑短信的界面
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setType("vnd.android-dir/mms-sms");
// intent.setData(Uri.parse("content://mms-sms/conversations/"));//此为号码
startActivity(intent);
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- 使用intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- Android开发之Intent跳转到系统应用中的拨号界面、联系人界面、短信界面
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- 通过Intent跳转到系统应用中的activity:拨号界面、联系人界面、短信界面 .相机.录影机
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他
- WWDC2016 Session笔记 - iOS 10 UICollectionView新特性
- 第三方接口开发规范
- Java过滤器与SpringMVC拦截器之间的关系与区别
- Erdaicms旅游网站程序微信公众号及微信支付参数配置教程
- Servlet介绍(3)——cookie和session
- Intent跳转到系统应用中的拨号界面、联系人界面、短信界面
- James Grenning访谈录:关于测试驱动开发及代码异味
- js判断手机号是否正确并返回
- test-nginx 使用文档
- IT 小笑话,闲暇放松
- camera ISP
- Jsoncpp的使用
- Git配置多账号登录不同项目
- Java并发编程的艺术(七)——Executors