Android打开系统自带应用管理画面
来源:互联网 发布:python 字符串函数 编辑:程序博客网 时间:2024/05/16 10:20
MainActivity如下:
package cc.testsetting;import android.net.Uri;import android.os.Bundle;import android.provider.Settings;import android.view.View;import android.view.View.OnClickListener;import android.widget.Button;import android.app.Activity;import android.content.Intent;/** * Demo描述: * 跳转到系统自带的应用管理画面 * 或者跳转到系统自带的应用管理画面下的某个App的管理画面 * * 参考资料: * http://jykenan.iteye.com/blog/1654925 * Thank you very much */public class MainActivity extends Activity { private Button mManageAppButton; private Button mManageAppsButton;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.main);init();}private void init(){mManageAppButton=(Button) findViewById(R.id.manageAppButton);mManageAppButton.setOnClickListener(new ClickListenerImpl());mManageAppsButton=(Button) findViewById(R.id.manageAppsButton);mManageAppsButton.setOnClickListener(new ClickListenerImpl());}private class ClickListenerImpl implements OnClickListener{@Overridepublic void onClick(View v) {switch (v.getId()) {case R.id.manageAppButton:Intent manageAppIntent = new Intent(); manageAppIntent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);//第二个参数为包名Uri uri = Uri.fromParts("package", "cc.testsetting", null); manageAppIntent.setData(uri); startActivity(manageAppIntent); break;case R.id.manageAppsButton:Intent manageAppsIntent = new Intent(); manageAppsIntent.setAction("android.intent.action.MAIN"); manageAppsIntent.setClassName("com.android.settings", "com.android.settings.ManageApplications"); startActivity(manageAppsIntent); break;default:break;}}}}
main.xml如下:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" > <Button android:id="@+id/manageAppButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:text="ManageApp" android:layout_marginTop="120dip" /> <Button android:id="@+id/manageAppsButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:text="ManageApps" android:layout_marginTop="250dip" /> </RelativeLayout>
- Android打开系统自带应用管理画面
- android进入系统自带的程序应用管理
- Android打开系统自带浏览器
- android Accessibility系统自带语音助手打开第三方应用
- Android自带加载画面的ListView
- android打开系统自带的网络设置界面
- Android指定调用系统自带浏览器打开链接
- 打开Android系统自带日历的新建提醒界面
- Android 使用intent打开手机自带应用播放视频,音频,文档,还有打开应用市场
- 使用intent调用Android系统自带应用
- 使用Android系统自带的应用统计
- 使用intent调用Android系统自带应用
- 使用Android系统自带的应用统计!!!
- android 删除手机自带的系统应用
- 使用intent调用Android系统自带应用
- 使用intent调用Android系统自带应用
- android调用系统自带应用--如拨号
- 利用命令行删除Android系统自带应用的方法
- 对于驱动调试有用的两个小工具(devmem2、devkmem)
- python Django 教程
- collections文档阅读
- 对于嵌入式系统中DDRx初始化的总结
- eclipse 中使用 Tomcat
- Android打开系统自带应用管理画面
- 你觉得什么样的人和我配
- 软件开发过程
- 自定义u-boot启动logo的方法
- Android中View绘制流程以及invalidate()等相关方法分析
- Visual studio 常用快捷键
- 数据读取器对象SqlDataReader与数据适配器对象SqlDataAdapter的使用
- 容器适配器之queue
- php-cgi占用cpu100%的一次排障之旅&poll([{fd=6, events=POLLIN}], 1, 0) = 0 (Timeout)