• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

"network" location requires access fine location, found fix, unsure how to use.

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:
upload_2016-10-26_23-50-42.png
"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.

upload_2016-10-26_23-52-46.png
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.

TL:DR version
Does anyone know how to request permission on run time for android? As I fear my attempts have failed terribly so far
 
Top