在Apk应用程序内,查找某个Activity。

转载请注明出处:http://blog.csdn.net/droyon/article/details/39933677

Intent intent = new Intent(Intent.ACTION_APP_ERROR);
        intent.setPackage(receiverPackage);
        ResolveInfo info = pm.resolveActivity(intent, 0);
        if (info == null || info.activityInfo == null) {
            return null;
        }

 return new ComponentName(receiverPackage, info.activityInfo.name);

假设存在,则info.activityInfo.name就是要查找的应用名称。

原文地址:https://www.cnblogs.com/mengfanrong/p/5118839.html