0

In my App, I want to get all the app installed, code like this

    PackageManager packageManager = getPackageManager();

    Intent intent = new Intent();
    intent.setAction(Intent.ACTION_MAIN);
    intent.addCategory(Intent.CATEGORY_LAUNCHER);

    List<ResolveInfo> resolveInfos = packageManager.queryIntentActivities(intent, 0);

when I give the permission of READ_PHONE_STATE. I get all the apps, But when I refuse, I get only three app info, it makes me confuse. anyone can explain it. thanks

Faysal Ahmed
  • 6,464
  • 5
  • 23
  • 43
SimK
  • 1

0 Answers0