AnyCut | 创建桌面快捷方式 | PackageManager获得系统基本信息 | UserTask多线程
来源:互联网 发布:在澳洲用淘宝吗 编辑:程序博客网 时间:2024/05/17 04:47
AnyCut可以创建 联系人电话快捷方式、联系人短信快捷方式、系统基本Activity的快捷方式、用户自定义快捷方式。 [效果图] PackageManager Class for retrieving various kinds of information related to the application packages that are currently installed on the device. You can find this class through queryIntentActivities (Intent intent, int flags) ResolveInfo Information that is returned from resolving an intent against an IntentFilter. This partially corresponds to information collected from the AndroidManifest.xml's <intent> tags. queryIntentActivities获得Acitivities返回了 ResolveInfo类型的List集合。 ResolveInfo其实就是解析Itent返回的信息,也是 AndroidManifest.xml 标签的信息。 当点击效果图1的[Acitivity]菜单时,会进入一个列表界面,陈列了系统中所有基本的Activity子项目。选择其一后,就会将选中项目作为快捷方式显示在桌面。 设置快捷方式的名字、图标、Intent。 想必,若要在桌面创建其他文件的快捷方式,关键也是通过设置Intent 来实现。:) Android在更新界面时,必须要在UI线程中进行。利用UserTask可以解决耗时操作导致ANR (界面更新慢)的问题。 扩展UserTask类: 1.在doInBackground做耗时操作,此处是用来获得系统所以基本Activity的项目; 2.在onPreExecute做初始化操作(界面初始化),此处是显示List滚动条; 3.onPostExecute用作耗时操作完成后要执行的工作(更新界面),此处时更新ListActivity的内容显示。 1. extends ListActivity 当一个Activity只显示一个ListView时,可以让它继承ListActivity,而不是继承Activity. 2. String集合 3.List排序 Collections.sort (list, new ResolveInfo.DisplayNameComparator(mPackageManager)); [参考] ResolveInfo http://www.moandroid.com/?p=1095 获取应用基本信息 http://hiapk.com/thread-23708-1-1.htmlhttp://blog.csdn.net/stefzeus/archive/2011/05/04/6393472.aspx
一、概述
二、获得系统基本信息
getPackageManager()
.
Retrieve all activities that can be performed for the given intent.三、创建桌面快捷方式
四、UserTask多线程
五、其他技巧
- AnyCut | 创建桌面快捷方式 | PackageManager获得系统基本信息 | UserTask多线程
- AnyCut | 创建桌面快捷方式 | PackageManager获得系统基本信息 | UserTask多线程
- ubuntu系统创建桌面快捷方式
- ubuntu系统下创建软件桌面快捷方式
- ubuntu系统下创建软件桌面快捷方式
- ubuntu系统下创建软件桌面快捷方式
- ubuntu系统下创建软件桌面快捷方式
- Linux系统下,创建桌面快捷方式
- ubuntu系统下创建软件桌面快捷方式
- ubuntu系统下创建软件桌面快捷方式
- ubuntu系统下创建软件桌面快捷方式
- ubuntu系统下创建软件桌面快捷方式
- ubuntu系统下创建软件桌面快捷方式
- android 创建桌面快捷方式,4.0系统可用
- ubuntu系统下创建软件桌面快捷方式
- ubuntu系统下创建软件桌面快捷方式
- ubuntu系统下创建软件桌面快捷方式
- 创建锁定桌面快捷方式
- Windows 系统自带计算器使用说明和技巧
- hadoop hdfs java api 文件操作类
- Struts2的类型转换器-续
- oracle 正则表达式 试用
- OA配置
- AnyCut | 创建桌面快捷方式 | PackageManager获得系统基本信息 | UserTask多线程
- Android组件之自定义下载进度条
- 超大并发量http请求应用的解决方案
- C# observer模式
- Date、String、Calendar类型之间的转化
- [android反编译小结]apktool/ AXMLPrinter2.jar/ dex2jar.bat/ jd-gui/ Jodeclipse/ JadClipse
- understand ORACLE执行计划
- getting detailed process information on Freebsd
- sqlite3.OperationalError: unrecognized token: ":"