Android permission.INTERACT_ACROSS_USERS_FULL
java.lang.SecurityException: Permission Denial: get/set setting for
user asks to run as user -2 but is calling from user 0; this requires
android.permission.INTERACT_ACROSS_USERS_FULL
Add this android:protectionLevel="signature"
in your manifest .
For more details, you can check Permission-Element
Like:
<permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" android:protectionLevel="signature"/>
android.permission.INTERACT_ACROSS_USERS_FULL on older Android versions
You are trying to add a signature level permision, which would not work unless your app has the same signature with the android device you are trying to run your app on, this feature is mostly unavailable to most developers and varies with API.
For more info read the Android Developers page https://developer.android.com/guide/topics/manifest/permission-element.html
What do I do about: this requires android.permission.INTERACT_ACROSS_USERS_FULL
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.
Permission Denial: this requires android.permission.INTERACT_ACROSS_USERS_FULL
According to this answer: 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.
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.
Android Requires android.permission.INTERACT_ACROSS_USERS_FULL
According to answer from here.
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.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.
However, reading your loagcat and code.
04-25 19:10:10.405 2749-2749/com.example.innovator.httpclientapp E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.innovator.httpclientapp/com.example.innovator.httpclientapp.MainActivity}: android.os.NetworkOnMainThreadException
Above error suggests that a network call cannot be made on main thread. So, make a new thread and start network call from that thread. It might solve your problem.
new Thread() {
public void run() {
// your network call
}
}.start();
If you want to have callbacks and stuff you can use AsyncTask as well.
Also a suggestion, for making nice and quick network calls you can use volley. It is my personal favorite and very easy to use!
Related Topics
Circular Reveal Transition for New Activity
How to Manage Audio Volumes Sanely in My Android App
Android Singleton with Global Context
Android - Running a Method Periodically Using Postdelayed() Call
How Can Write Code to Make Sharedpreferences for Array in Android
How to Get Profile Like Gender from Google Signin in Android
How to Order My SQLite Database in Descending Order, for an Android App
How to Create a File on Android Internal Storage
Urlconnection or Httpclient: Which Offers Better Functionality and More Efficiency
Android: Programmatically Adding Buttons to a Layout
How to Pause Frame Animation Using Animationdrawable
Gradle 7 and Jitpack.Io Runs into Error During Publish
Unable to Execute Adb in Ubuntu. Downloaded File Is Meant for X86-64 While I Have I686
How to Extract Code of .Apk File Which Is Not Working
Nexus 7 Not Visible Over Usb via "Adb Devices" from Windows 7 X64