现在开发中的功能需要直接跳转到拨号、联系人、短信界面等等,查找了很多资料,自己整理了一下。
1、跳转到拨号界面,代码如下:

1)直接拨打

  1. Intent
    intentPhone = new Intent(Intent.ACTION_CALL,
    Uri.parse("tel:" +
    phoneNumber));

    startActivity(intentPhone);

  2. 2)跳转到拨号界面
  3. Intent
    intent = newIntent(Intent.ACTION_DIAL,Uri.parse("tel:" + phoneNumber));

    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

    startActivity(intent);

  4. 2、跳转到联系人页面,使用一下代码:

    1. Intent intentPhone = new Intent(Intent.ACTION_CALL,
      Uri.parse("tel:" +
      phoneNumber));
      startActivity(intentPhone);
     
     
    以下内容为转载:
     
    Android开发之Intent跳转到系统应用中的拨号界面、联系人界面、短信界面
    现在开发中的功能需要直接跳转到拨号、联系人、短信界面等等,查找了很多资料,自己整理了一下。

    //安装已经存在的apk

    String filePath="mnt/sdcard/abc.apk";

    Intent intent = new  Intent(Intent.ACTION_VIEW);

    intent.setDataAndType(Uri.parse("file://" + filePath),

    "application/vnd.android.package-archive");

    startActivity(intent);//直接跳到安装页面,但是还要点击按钮确定安装,还是取消安装

    //卸载某应用

    String packageName="org.adw.launcher2"

    Uri packageUri = Uri.parse("package:"+packageName);//包名,指定该应用

    Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageUri);

    startActivity(uninstallIntent);

    //查看某一应用程序的信息

    Uri uri=Uri.parse("package:"+packageName);//包名,指定该应用

    Intent intent=new Intent("android.settings.APPLICATION_DETAILS_SETTINGS", uri);

    startActivity(intent);

    2.浏览网页某一具体网址

    Uri uri = Uri.parse("http://xxxxxxxxxxxxxxxxxxxxxxxx");

    Intent
    intent   = new Intent(Intent.ACTION_VIEW,uri);

    //加下面这句话就是启动系统自带的浏览器打开上面的网址, 
    不加下面一句话,
     
    如果你有多个浏览器,就会弹出让你选择某一浏览器,

    然后改浏览器就会打开该网址
    ...............

    intent.setClassName("com.android.browser", "com.android.browser.BrowserActivity");

    startActivity(intent);

    //系统

     
    设置 
    界面

    Intent intent=new Intent();

    intent.setClassName("com.android.settings","com.android.settings.Settings");

    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);

    //拨号

    Uri uri = Uri.parse("tel:xxxxxx");

    Intent intent = new Intent(Intent.ACTION_DIAL, uri);

    startActivity(intent);

    //启动拨号界面,指定了类名 
    包名
      

    是系统的拨号界面
       
    DialtactsActivity

    Intent intent= new Intent("android.intent.action.DIAL");

    intent.setClassName("com.android.contacts","com.android.contacts.DialtactsActivity");

    startActivity(intent);

    //系统 
    联系人
     
    界面
       
    PeopleActivity

    Intent intent001 = new Intent();

    intent001.setClassName("com.android.contacts","com.android.contacts.activities.PeopleActivity");

    startActivity(intent001);

    //系统 
    搜索
      

    界面
       
    SearchActivity

    Intent intent002=new Intent();

    intent002.setClassName("com.android.quicksearchbox", "com.android.quicksearchbox.SearchActivity");

    startActivity(intent002);

    //启动短信收件箱的界面,指定了包名,类名

    Intent intent4
    = new Intent();

    intent4.setClassName("com.android.mms","com.android.mms.ui.ConversationList");

    startActivity(intent4);

    //启动联系人界面,不好

    Intent intent = new Intent();

    intent.setAction(Intent.ACTION_PICK);

    intent.setData(Contacts.People.CONTENT_URI);

    startActivity(intent);

     
    插入联系人
    Intent intent=new Intent(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);
    

Android开发之Intent跳转到系统应用中的拨号界面、联系人界面、短信界面的更多相关文章

  1. Android开发中使用Intent跳转到系统应用中的拨号界面、联系人界面、短信界面

    现在开发中的功能需要直接跳转到拨号.联系人.短信界面等等,查找了很多资料,自己整理了一下. 首先,我们先看拨号界面,代码如下: Intent intent =new Intent(); intent. ...

  2. Intent跳转到系统应用中的拨号界面、联系人界面、短信界面及其他

    现在开发中的功能需要直接跳转到拨号.联系人.短信界面等等,查找了很多资料,自己整理了一下. 首先,我们先看拨号界面,代码如下: Intent intent =new Intent(); intent. ...

  3. android开发之Intent.setFlags()_让Android点击通知栏信息后返回正在运行的程序

    android开发之Intent.setFlags()_让Android点击通知栏信息后返回正在运行的程序     在应用里使用了后台服务,并且在通知栏推送了消息,希望点击这个消息回到activity ...

  4. Android开发之Intent略解

    Intent是一种运行时绑定(run-time binding)机制,它能在程序运行过程中连接两个不同的组件.通过Intent,你的程序可以向Android表达某种请求或者意愿,Android会根据意 ...

  5. Android开发之Intent.Action

    1 Intent.ACTION_MAIN String: android.intent.action.MAIN 标识Activity为一个程序的開始.比較经常使用. Input:nothing Out ...

  6. Android开发之Intent.Action 各种Action的常见作用

    1 Intent.ACTION_MAIN String: android.intent.action.MAIN 标识Activity为一个程序的开始.比较常用. Input:nothing Outpu ...

  7. Android开发之Intent.Action Android中Intent的各种常见作用

    1 Intent.ACTION_MAIN String: android.intent.action.MAIN 标识Activity为一个程序的开始.比较常用. Input:nothing Outpu ...

  8. Android开发之Intent的传值--Application

    每当我们想要将输入的值传递到多个界面时,只是使用Intent传值的话,就会有一些的弊端. 下面我就以三个页面为例,进行简单的说明一下: 思路: 1.第一个页面是客户输入相关的信息. 2.将客户输入的信 ...

  9. android开发之Fragment加载到一个Activity中

    Fragments 是android3.0以后添加的.主要是为了方便android平板端的开发.方便适应不同大小的屏幕.此代码是为了最简单的Fragment的使用,往一个Activity中添加Frag ...

随机推荐

  1. c语言诊断_断言库函数#include<assert.h>

    诊断<assert.h>  assert #include <assert.h> void assert(int exp); assert宏用于为程序增加诊断功能.当asser ...

  2. 步步为营 SharePoint 开发学习笔记系列总结

    转:http://www.cnblogs.com/springyangwc/archive/2011/08/03/2126763.html 概要 为时20多天的sharepoint开发学习笔记系列终于 ...

  3. HTML5,CSS3 与 Javascript 制作视频播放器

    早一段时间,有一直研究 HTML5 和 CSS3 ,自己也做了不少 Demo ,只是 HTML5 Video 和 Audio 由于自己平时比较喜欢留意不同的播放器,因此特别想做一个自己喜欢的设计,考虑 ...

  4. CoreCLR源码探索(二) new是什么

    前一篇我们看到了CoreCLR中对Object的定义,这一篇我们将会看CoreCLR中对new的定义和处理 new对于.Net程序员们来说同样是耳熟能详的关键词,我们每天都会用到new,然而new究竟 ...

  5. S3C2440触摸屏驱动实例开发讲解

    出处:http://www.embeddedlinux.org.cn/html/yingjianqudong/ 一.开发环境 主  机:VMWare--Fedora 9 开发板:Mini2440--6 ...

  6. bzoj 1975 [Sdoi2010]魔法猪学院(k短路)

    题目描述 iPig在假期来到了传说中的魔法猪学院,开始为期两个月的魔法猪训练.经过了一周理论知识和一周基本魔法的学习之后,iPig对猪世界的世界本原有了很多的了解:众所周知,世界是由元素构成的:元素与 ...

  7. 嵌套在母版页中的repeater自动生成控件ID

    注:如果直接在后台通过e.Item.FindControl()方法直接找控件,然后再通过对其ID赋值,在编译之后会出现“母版页名称_ID“类似的很长的ID值(详情点击) 解决方法:<asp:Co ...

  8. https://hub.docker.com/

  9. c++学生成绩管理系统

    虽然比较水 =.= 但是写了两节课+一个中午 都是强迫症的锅 http://www.cnblogs.com/wenruo/p/4940182.html #include <cstdio> ...

  10. JVM 进行线程同步背后的原理

    前言 所有的 Java 程序都会被翻译为包含字节码的 class 文件,字节码是 JVM 的机器语言.这篇文章将阐述 JVM 是如何处理线程同步以及相关的字节码. 线程和共享数据 Java 的一个优点 ...