1)通过包名直接打开:
2) 通过包名类名打开:
3)通过Action打开:
Intent intent = getPackageManager().getLaunchIntentForPackage("com.example.test");//包名
startActivity(intent);
2) 通过包名类名打开:
ComponentName com = new ComponentName("com.example.test", "com.example.test.MainActivity");//包名,类名
Intent intent = new Intent();
intent.setComponent(com);
startActivity(intent);
3)通过Action打开:
Intent intent = new Intent("MY_ACTION"); //<span style="font-family: Arial, Helvetica, sans-serif;">应用activity注册的Action</span>
startActivity(intent);