E
ericbomb
Guest
Hello,
So I'm using an extension that uses the following java file (extension was on the store, discontinued for issues, go figure)
https://www.dropbox.com/s/hyc73wt3pcybcjp/GMGeolocation.java?dl=0
Anyway I've plugged through about 5 different issues with it and am running into this issue now and am stuck:
"java.lang.securityexception: "network" location provider requires access_coarse_location or access_fine_location permission"
The problem is that I already have the correct section filled out.
So after a quick google search I found the following:
https://developer.android.com/training/permissions/requesting.html
It turns out that these two are unsafe permissions, so I have to request permission for them on run time, the problem is, I have no idea how to insert the code in a way that works. Every time I try to insert the request permission it fails to compile (right now it fails to compile and then crashes on startup)
So does anyone have experience requesting permission on run time on how I need to do it? I tried about 20 times to put the code in and I'm pretty much out of ideas now I fear.
TLR version
Does anyone know how to request permission on run time for android? As I fear my attempts have failed terribly so far
So I'm using an extension that uses the following java file (extension was on the store, discontinued for issues, go figure)
https://www.dropbox.com/s/hyc73wt3pcybcjp/GMGeolocation.java?dl=0
Anyway I've plugged through about 5 different issues with it and am running into this issue now and am stuck:
"java.lang.securityexception: "network" location provider requires access_coarse_location or access_fine_location permission"
The problem is that I already have the correct section filled out.
So after a quick google search I found the following:
https://developer.android.com/training/permissions/requesting.html
It turns out that these two are unsafe permissions, so I have to request permission for them on run time, the problem is, I have no idea how to insert the code in a way that works. Every time I try to insert the request permission it fails to compile (right now it fails to compile and then crashes on startup)
So does anyone have experience requesting permission on run time on how I need to do it? I tried about 20 times to put the code in and I'm pretty much out of ideas now I fear.
TLR version
Does anyone know how to request permission on run time for android? As I fear my attempts have failed terribly so far