Skip to content Skip to sidebar Skip to footer

Can An App Determine The Other Apps That Are On The Phone And What Permissions They Have?

I'm wondering if an app has access to the info that shows the other apps on the phone and what permissions they have (i.e. access to your location, contacts, etc). Could I create a

Solution 1:

Yes. Use the PackageManager. Call GetInstalledPackages to list the installed packages, and then check the requestedPermissions field to see the permissions for each package.

Note: the method below assumes this refers to an Activity.

privatevoidgetAppPermissions() {

    List<PackageInfo> apps = this.getPackageManager().getInstalledPackages(PackageManager.GET_PERMISSIONS);

    for (PackageInfo app : apps) {
        String appInfo = app.packageName + ": ";
        String[] permissions = app.requestedPermissions;
        if (null == permissions) {
            appInfo += "no permissions requested\n";
        } else {
            for (String permission : app.requestedPermissions) {
                appInfo += "\n    " + permission;                   
            }
        }
        Log.v("App Permissions", appInfo);
    }
}

You may wish to filter the list of returned packages as per this question.

Solution 2:

Yes you can. For Android, you just go to Settings > Applications

And you just tap on the application that you want to check, and on the bottom it should say the permissions the app possesses.

For ios, you go to Settings > Privacy

And you tap on the desired type of permission, and you can see the apps that have that permission.

Post a Comment for "Can An App Determine The Other Apps That Are On The Phone And What Permissions They Have?"