Android Question problem setWifiApEnabled in Android 23

Discussion in 'Android Questions' started by welu1805, Dec 6, 2018.

  1. welu1805

    welu1805 Active Member Licensed User

    Hi all,

    "Modify system settings" for an app is not available in android 23. (I can't find it).

    But there is an error message in debug mode if I want to "setWifiApEnabled"

    Caused by: java.lang.SecurityException: de.wedersoft.musicbook was not granted this permission: android.permission.WRITE_SETTINGS.

    Has anyone on idea?

    Lutz
     
  2. DonManfred

    DonManfred Expert Licensed User

    BillMeyer likes this.
  3. welu1805

    welu1805 Active Member Licensed User

    I tried this but it doesn't work, because in Android 23 "Modify system settings" for an app is not available.
     
  4. DonManfred

    DonManfred Expert Licensed User

    I checked the intent on my Note 8 (Android 8). It does point to the systemsetting where the user need to enable my app for write the settings.

    Did you read the stackoverflow article?
     
    BillMeyer likes this.
  5. welu1805

    welu1805 Active Member Licensed User

    Yes I read. With my Android 7 it works and the user can turn on write system settings. I don't have an Android 8 device. My problen NOW is that it doesn' t work with Android 6.
     
  6. welu1805

    welu1805 Active Member Licensed User

    Now I know where to "Modify System Settings" manually under Marshmallow. That is different from Nougat.

    In Nougat its easy: Settings, Apps, choose the app and directly Modify System Settings.

    In Marshmallow: Settings, Apps and again Settings. Choose the app and a new window appears from where we can Modify System Settings.

    The code from #2 works under Marshnellow too. I had a bug in my app.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice