android 启动其他程序

Intent intent = new Intent();
intent.setClassName("com.linxcool","com.linxcool.PlaneActivity");
startActivity(intent);

Intent intent = new Intent();
ComponentName comp = new ComponentName("com.linxcool","com.linxcool.PanelActivity");
intent.setComponent(comp);
intent.setAction("android.intent.action.MAIN");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);

context.startActivity(context.getPackageManager().getLaunchIntentForPackage(APP_PACKAGE_NAME));

posted @ 2022-06-03 13:03  mtgold  阅读(100)  评论(0编辑  收藏  举报