microg / IchnaeaNlpBackend

Backend for UnifiedNlp that uses Mozilla Location Service for geolocation.
119 stars 28 forks source link

Exception if location permission is missing on Android 6 #17

Closed herndlm closed 8 years ago

herndlm commented 8 years ago

Hi, just a note if other people are looking for the same problem. The app force closes if the location permission is missing on Android 6 with the following exception:

01-14 13:14:50.510 15391 15391 E AndroidRuntime: FATAL EXCEPTION: main
01-14 13:14:50.510 15391 15391 E AndroidRuntime: Process: org.microg.nlp.backend.ichnaea, PID: 15391
01-14 13:14:50.510 15391 15391 E AndroidRuntime: java.lang.SecurityException: Neither user 10113 nor current process has android.permission.ACCESS_COARSE_LOCATION.

It's just displaying a common error in the GUI, but works if the location permission is granted manually. Nice would be a dialogue I guess, but a simple toast message that leads in the right direction may also be enough.