android的intent打开系统程序
打开设置主界面
Intent intent = new Intent(Android.provider.Settings.ACTION_SETTINGS); //系统设置
startActivityForResult( intent , 0);
打开网络设置界面(其他设置中的界面同理)
Intent intent = new Intent(android.provider.Settings.ACTION_WIFI_SETTINGS);//WIFI设置
startActivity(intent);
new Intent(android.provider.Settings.ACTION_APPLICATION_SETTINGS);//管理应用程序界面
new Intent(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS);//打开蓝牙设置
或者用以下方法(3.0以前的版本可以用此方法)
Intent intent = new Intent("/");
ComponentName cm = new ComponentName("com.android.settings","com.android.settings.WirelessSettings");
intent.setComponent(cm);
intent.setAction("android.intent.action.VIEW");
startActivityForResult( intent , 0);
打开壁纸设置
Intent intent = new Intent(Intent.ACTION_SET_WALLPAPER);
startActivity(intent);
打开拨号界面
Intent intent = new Intent(Intent.ACTION_DIAL);
startActivity(intent);
打开联系人界面
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setType("vnd.android.cursor.dir/contact");
startActivity(intent);
打开通话记录
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setType("vnd.android.cursor.dir/calls");
startActivity(intent);
打开短信列表界面
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setType("vnd.android-dir/mms-sms");
startActivity(intent);
打开相册和视频
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setType("vnd.android.cursor.dir/image");//图片列表
intent.setType("vnd.android.cursor.dir/video");//视频列表
startActivity(intent);
打开mp3播放器
Intent intent = new Intent("android.intent.action.MUSIC_PLAYER");
startActivity(intent);
打开照相机
Intent intent = new Intent("android.media.action.STILL_IMAGE_CAMERA");
startActivity(intent);
打开录音
选择一张照片或一个mp3文件或一个mp4文件
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);//图片
intent.setType("image/*");
startActivityForResult(Intent.createChooser(intent, "Select Picture"),1);
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);//音频
intent.setType("audio/*");
startActivityForResult(Intent.createChooser(intent, "Select music"),1);
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);//视频
intent.setType("video/*");
startActivityForResult(Intent.createChooser(intent, "Select movie"),1);
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);//录音
intent.setClassName("com.android.soundrecorder", "com.android.soundrecorder.SoundRecorder");
intent.setType("audio/*");
startActivityForResult(Intent.createChooser(intent, "Select movie"),1);
android的intent打开系统程序的更多相关文章
- 通过Intent 打开系统级应用
众所周知,各个手机厂商由于对Android 原生系统定制的原因,会造成系统级应用packname 和activityname 不同的现象,就拿时钟软件来说,魅族2的activityname 是[com ...
- msys 中打开系统程序
按照msys 后发现sh自带的vim不好用,下载安装了个gvim,在etc/profile中作如下设置: alias gvim="D:/Program\ Files/Vim/vim73/gv ...
- android 程序打开第三方程序
因为在开发过程中需要开启扫描第三方程序,并且点击启动的效果,所以对这个功能进行了实现,并且分享出来个大家. 之前看到网上说需要获取包名和类名,然后通过 intent 才能打开这个程序,其实不必要这样 ...
- Android 打开系统相册和系统视
1.打开系统相册 Intent intent = new Intent(Intent.ACTION_VIEW); intent.setType("vnd.android.cursor.dir ...
- Android第一次打开应用程序,实现向导界面
转载请注明出处,谢谢http://blog.csdn.net/harryweasley/article/details/42079167 先说下思路:1.利用Preference存储数据,来记录是否是 ...
- Android 监听 Android中监听系统网络连接打开或者关闭的实现代码
本篇文章对Android中监听系统网络连接打开或者关闭的实现用实例进行了介绍.需要的朋友参考下 很简单,所以直接看代码 复制代码 代码如下: package xxx; import android.c ...
- 安卓 通过intent调用系统文件管理器打开指定路径目录
安卓 通过intent调用系统文件管理器打开指定路径目录 转 https://blog.csdn.net/qq_34161388/article/details/78586247 当我们知道 ...
- Android -- 分享功能和打开指定程序
打开指定程序 Intent intent ...
- android 推断应用程序是系统程序还是用户程序
直接上代码: AppInfo.java <span style="font-size:18px;">package com.example.packages; publ ...
随机推荐
- EXCEL表格常用函数使用的难点
1. INDIRECT(ref_text,逻辑值) 返回由文本字符串指定的引用.此函数立即对引用进行计算,并显示其内容.ref_text,文本引用说明, (1) A1-样式的引用(逻辑值,T,缺省) ...
- [Codeforces 501D] - Misha and Permutations Summation
题意是给你两个长度为$n$的排列,他们分别是$n$的第$a$个和第$b$个全排列.输出$n$的第$\left(a+b \right)\textrm{mod} \, n!$个全排列. 一种很容易的想法是 ...
- .Net操作XML文件
//设置配置文件物理路径 public string xmlPath = "/manage/spider/config.xml"; protected void Page_Load ...
- Android - Layout时发生'Unfortunately xxx has stopped'
概述 我在进行LinearLayout和TableLayout的嵌套布局的时候,发生题的错误.如下布局xml代码: <LinearLayout xmlns:android="http: ...
- 跟我学android-Android应用结构分析(四)
自动生成的R.java文件说明 public final class R { public static final class attr { } public static final class ...
- hibernate的get、load的方法的区别,IllegalArgument异常
关于hibernate中的load,get,以及延迟加载问题 今天在使用hibernate时,发现一异常: could not initialize proxy - no Session 查询资料之后 ...
- AutoMapper DynamicMap天坑
如果调用Mapper.DynamicMap该方法,会将所有映射重置为默认映射,即以字段名匹配映射.
- Python三元表达式
我们知道Python没有三元表达式,但是我们通过技巧达到三元表达式的效果. 摘自<Dive Into Python>: 在Python 中,and 和 or 执行布尔逻辑演算,如你所期待的 ...
- 函数部分应用Partial application
def adder(m:Int,n:Int)=m+n val add2 = adder(2,_:Int) println(add2(3)) val add3 = adder(_:Int,3) prin ...
- History Grading
uva111:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24& ...