PackageManager pm = getPackageManager();
for (ApplicationInfo app : pm.getInstalledApplications(0)) {
Log.d("PackageList", "package: " + app.packageName + ", sourceDir: " + app.sourceDir);
}
使用 Intent 啟動 app…
PackageManager pm = getPackageManager();
Intent intent = pm.getLaunchIntentForPackage("com.example.helloworld");
startActivity(intent);
沒有留言:
張貼留言