2013年1月1日 星期二
app list
String outt = "";
final PackageManager pm = getPackageManager();
// get a list of installed apps.
List<ApplicationInfo> packages = pm
.getInstalledApplications(PackageManager.GET_META_DATA);
for (ApplicationInfo packageInfo : packages) {
outt= outt+packageInfo.loadLabel(getPackageManager()).toString()+"\n";
outt = outt + packageInfo.packageName + "\n";
outt = outt + pm.getLaunchIntentForPackage(packageInfo.packageName)
+ "\n--------------\n";
}// the getLaunchIntentForPackage returns an intent that you can use
// with startActivity()
-------------------------------------------------
http://stackoverflow.com/questions/2695746/how-to-get-a-list-of-installed-android-applications-and-pick-one-to-run
http://www.androidsnippets.com/get-installed-applications-with-name-package-name-version-and-icon
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言