Android在一个app中启动另一个App

        Intent intent = new Intent(Intent.ACTION_MAIN);
             intent.addCategory(Intent.CATEGORY_LAUNCHER);
             ComponentName cn = new ComponentName("com.example.timer", "com.example.timer.MainActivity");//包名,类名
             intent.setComponent(cn);
             startActivity(intent);

 

posted @ 2017-08-12 13:22  段合江  阅读(343)  评论(0编辑  收藏  举报