2

I want to use UserManager in my code. But for that it requires the permission MANAGE_USERS

I tried adding it in the manifest but there is no permission listing in manifest called MANAGE_USERS.

Then I tried adding this line

<uses-permission android:name="android.permission.MANAGE_USERS" />

but still it gives error while running , says

java.lang.SecurityException: You need MANAGE_USERS permission to: query user

My minSdk version is 14. How can I add this permission? Thanks in advance..

  • This might be helpful. http://stackoverflow.com/questions/13508258/usermanager-getusercount-jelly-bean – zeeali Mar 14 '16 at 09:23

2 Answers2

0

You need to sign your app with platform signature to use this permission. This maybe helpful for you.

Community
  • 1
  • 1
Yogesh Umesh Vaity
  • 41,009
  • 21
  • 145
  • 105
0

You have add below permission to query the user

<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
<uses-permission android:name="android.permission.MANAGE_USERS" />

But application should be System or Signed app.

Navas pk
  • 331
  • 3
  • 17