What do I do about: this requires android.permission.INTERACT_ACROSS_USERS_FULL
Asked Answered
C

5

15

I am working on integrating micode's open source compass into an app I am making. I am wondering how I can fix this here permission error when I clearly have it stated in my manifest with the correct spelling. Its still coming up that I need that permission.

This is puzzling me...

11-03 13:53:58.241: E/AndroidRuntime(8975): Caused by: \
    java.lang.SecurityException: Permission Denial: registerReceiver from \
    net.micode.compass asks to run as user -1 but is calling from user 0; this \
    requires android.permission.INTERACT_ACROSS_USERS_FULL
Coercion answered 3/11, 2013 at 18:58 Comment(1)
Raghav has right.. This is a signature level permission, you cannot use it in your app unless it has the same signature of the system, i.e., you have built the system yourself and you have signed it with your own key. BTW, could you show me which exact piece of code that produced this exception? I am just curious..Bridgework
D
28

android.permission.INTERACT_ACROSS_USERS_FULL is a signature level permission. Your app will not be able to use it until and unless it has the same signature as the system.

Dato answered 3/11, 2013 at 19:1 Comment(4)
Which is not something you can achieve unless you either are the creator or the system build, or collaborating with them such that they are willing to sign your apk with their certificate. In other words, this is off limits for most developers.Collocation
so what to do? why is this happening?Oeildeboeuf
How do I add this permission...? is this the right way? <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />Jugoslavia
Please check this link, might be helpfull #28134628Hower
S
8

I had a same problem and i did project -> clean. It works now.

Scientist answered 7/4, 2015 at 4:55 Comment(0)
C
0

I know there is already an accepted answer but for some reason its not working (or no longer working) on my part.

This error happened to me on Android SDK version 19 and lower, because of NDK that was part of my app.

I just deleted few codes that are connected with NDK codes at the Android Manifests file.

Chelsae answered 13/3, 2018 at 5:30 Comment(0)
B
0

I disabled autofill and project started to work normally. Check this link

Just add this code to your app :

      if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
        window.decorView.importantForAutofill = 
        View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS;
    }
Breedlove answered 30/3, 2018 at 12:0 Comment(0)
B
0

The issue might be caused by an activity-scoped variable named "userId" or a method named "getUserId" that you have declared. Renaming the variable or method should resolve the problem, as the "getUserId" method is used by the context class and your declared function is overriding it.

Bucentaur answered 29/5 at 9:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.