已知包名和应用入口Activity
包名:org.ww
应用入口:Activity:org.ww.TestActivity
Intent intent = new Intent(); intent.setComponent(new ComponentName("org.ww","org.ww.TestActivity")); intent.setAction(Intent.ACTION_VIEW); startActivity(intent);
仅仅知包名
包名:org.ww
// 使用packageManager通过应用包名,得到intent PackageManager packageManager = this.getPackageManager(); Intent intentPackage = packageManager.getLaunchIntentForPackage("org.ww"); startActivity(intentPackage);