gelin / weather-notification

An utility which displays the weather in the Android notification bar
GNU General Public License v3.0
26 stars 11 forks source link

SecurityException with "network" location provider #42

Closed gelin closed 6 years ago

gelin commented 7 years ago

Original report by Denis Nelubin (Bitbucket: gelin, GitHub: gelin).


java.lang.SecurityException: "network" location provider requires ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission.
    at android.os.Parcel.readException(Parcel.java:1693)
    at android.os.Parcel.readException(Parcel.java:1646)
    at android.location.ILocationManager$Stub$Proxy.getLastLocation(ILocationManager.java:792)
    at android.location.LocationManager.getLastKnownLocation(LocationManager.java:1205)
    at ru.gelin.android.weather.notification.app.UpdateService.queryLocation(UpdateService.java:335)
    at ru.gelin.android.weather.notification.app.UpdateService.run(UpdateService.java:167)
    at java.lang.Thread.run(Thread.java:761)

On Android 6.0

gelin commented 6 years ago

Original comment by Denis Nelubin (Bitbucket: gelin, GitHub: gelin).


Added grant requests in Android 6,7 fashion.