I am getting this exception even though permissions for both are given. Unless I manually go and change one time, the error repeats everytime.If I have given permission manually once from then onwards I am not facing this error
I was getting the same error in a background service. If your case is the same you may give this permission and select "Allow all the time"
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
Can read the documentations here
https://developer.android.com/training/location/permissions?hl=en-419#background
this is my trace:
Caused by: java.lang.SecurityException: UID 10535 does not have Coarse/Fine Location permission
at android.os.Parcel.createException(Parcel.java:2071)
at android.os.Parcel.readException(Parcel.java:2039)
at android.os.Parcel.readException(Parcel.java:1987)
at android.net.wifi.IWifiManager$Stub$Proxy.startLocalOnlyHotspot(IWifiManager.java:3332)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.