How to get the permissions of an application?

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

How to get the permissions of an application?

Postby vaishumol » Fri Jul 30, 2010 10:40 am

Hi friends,
Can anyone help me to get the permissions of an application. I would like to print the permissions, an application contains.

Please its urgent.
Im trying this, but getting null value only.
Code: Select all
PackageManager packageManager = getPackageManager();
            List<PackageInfo> packs =
                  packageManager.getInstalledPackages(0);
int size = packs.size();
            for (int i = 0; i < size; i++)
            {
                p = packs.get(i);
PermissionInfo permList = new ArrayList<PermissionInfo[]>();
  permList.add(p.permissions);
}


and in manifest.xml file i added the following

Code: Select all
<uses-permission android:name="android.permission.GET_PERMISSIONS"/>


Please help me to solve the issue,.
Thanks in advance.
vaishumol
Experienced Developer
Experienced Developer
 
Posts: 74
Joined: Sun Jan 03, 2010 6:33 am

Top

Re: How to get the permissions of an application?

Postby vaishumol » Fri Jul 30, 2010 12:03 pm

Soved the issue :-)

thank you
vaishumol
Experienced Developer
Experienced Developer
 
Posts: 74
Joined: Sun Jan 03, 2010 6:33 am

Re: How to get the permissions of an application?

Postby supriya.dinakaran » Tue Aug 24, 2010 11:46 am

Hi....
could you please tell how you solved the issue...
as it would be easy for other developers.
supriya.dinakaran
Junior Developer
Junior Developer
 
Posts: 10
Joined: Tue Aug 10, 2010 11:30 am

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 1 guest