/** * 开启应用 */ private void startApp(String packageName) { PackageManager pm = getPackageManager(); Intent intent = pm.getLaunchIntentForPackage(packageName); try { startActivity(intent); } catch (Exception e) { // 做错误处理 Toast.makeText(this, "应用启动失败", Toast.LENGTH_SHORT).show(); } }