android应用程序中启动另一个应用程序

启动自己写的应用程序

  1. 前名一个参数是应用程序的包名,后一个是这个应用程序的主Activity名  
  2.  Intent intent=new Intent();  
  3.  intent.setComponent(new ComponentName("com.droidnova.android.games.vortex",   
  4.                                                      "com.droidnova.android.games.vortex.Vortex"));  
  5.  startActivity(intent); 

启动系统自带的应用程序

  1. Intent intent=new Intent();  
  2. intent.setComponent(new ComponentName("com.android.calendar""com.android.calendar.LaunchActivity"));  
  3. startActivity(intent);  

你可能感兴趣的:(android应用程序中启动另一个应用程序)