在Android中启动另外一个应用

    技术2022-05-20  37

    // 启动自己的应用,前名一个参数是应用程序的包名,后一个是这个应用程序的主Activity名

    Intent intent=new Intent();

     

    intent.setComponent(new ComponentName("com.droidnova.android.games.vortex",

         "com.droidnova.android.games.vortex..Vortex"));

     

    startActivity(intent);

     

     

     

     

     

    // 启动启动系统自带的应用程序

    Intent intent=new Intent();

     

    intent.setComponent(new ComponentName("com.android.calendar",

         "com.android.calendar.LaunchActivity"));

     

    startActivity(intent);


    最新回复(0)