java.lang.SecurityException: Permission denial: writing to settings requires android.permission.WRITE_SETTINGS

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Android SDK 23 introduced a new way to handle permissions, so as a temporary workaround you can set it to build for SDK below 23. As a permanent solution you have to ask user during runtime for permissions with checkSelfPermission() or requestPermissions()

,
Expert tip

You need the permission android.permission.READ_EXTERNAL_STORAGE. Write <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> on the Android Manifest

Solutions on the web

via Stack Overflow by Tobias Lukoschek
, 1 year ago
Permission denial: writing to settings requires android.permission.WRITE_SETTINGS
via Stack Overflow by Tom&#225;š Hub&#225;lek
, 2 years ago
net.hubalek.android.xxx was not granted this permission: android.permission.WRITE_SETTINGS.
via Stack Overflow by Shailesh Limbadiya
, 1 year ago
com.zennaxx.touchingeffect was not granted this permission: android.permission.WRITE_SETTINGS.
via Stack Overflow by Kenertj
, 1 year ago
com.example.kenert.allinoneapp was not granted this permission: android.permission.WRITE_SETTINGS.
via Stack Overflow by Samantha
, 2 months ago
t granted this permission: android.permission.WRITE_SETTINGS.
via tagwith.com by Unknown author, 1 year ago
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
java.lang.SecurityException: Permission denial: writing to settings requires android.permission.WRITE_SETTINGS
at android.os.Parcel.readException(Parcel.java:1540)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
at android.content.ContentProviderProxy.call(ContentProviderNative.java:643)
at android.provider.Settings$NameValueCache.putStringForUser(Settings.java:1094)
at android.provider.Settings$System.putStringForUser(Settings.java:1371)
at android.provider.Settings$System.putIntForUser(Settings.java:1476)
at com.matodayu.oxo.FullscreenActivity$4$1.run(FullscreenActivity.java:184)
at android.app.Activity.runOnUiThread(Activity.java:5285)
at com.matodayu.oxo.FullscreenActivity$4.onClick(FullscreenActivity.java:179)
at android.view.View.performClick(View.java:4809)
at android.view.View$PerformClick.run(View.java:20123)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5534)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:955)

Users with the same issue

Once, 1 day ago
Samebug visitor profile picture
Unknown user
Once, 1 day ago
Samebug visitor profile picture
Unknown user
Once, 2 days ago
Samebug visitor profile picture
Unknown user
Once, 2 days ago
Once, 2 days ago
249 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.