How to start an Intent from a ResolveInfo

后端 未结 2 1992
春和景丽
春和景丽 2021-02-01 17:17

I\'m trying to make a custom launcher for android, and I\'m trying to figure out how to launch a different application form mine. I figured the way to do it was intents, and I\

2条回答
  •  无人共我
    2021-02-01 18:01

    Create an new Intent by this way.

        Intent intent = new Intent();
        intent.setClassName(resolveInfo.activityInfo.applicationInfo.packageName,
                resolveInfo.activityInfo.name);
        startActivity(intent);
    

提交回复
热议问题