Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web Container to have location access #258

Open
shierro opened this issue Feb 16, 2019 · 3 comments
Open

Web Container to have location access #258

shierro opened this issue Feb 16, 2019 · 3 comments

Comments

@shierro
Copy link

shierro commented Feb 16, 2019

Hi, i have a single page web app, that i want to load in a web container. So far, it loads it well.

Now, some of the page needs to access location data, but for some reason the webview doesn't ask me to allow/block the location access, and rejects it immediately.

i have added some permissions but still doesn't seem to work

    <uses-permission android:name="android.permission.ACCESS_GPS" />
    <uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" />
    <uses-permission android:name="android.permission.ACCESS_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Might be related to this but i'm not sure how or where to inject the android code

Can anyone give me some leads on how to do this properly? Will appreciate any feedback and thanks in advance!

@clsource
Copy link
Contributor

Normally you could use and agent https://jasonelle.com/jasonette-old-docs/agents/
to fetch the location using the native apis and then inject the result in your webview.

@SRosales0520
Copy link

I, along with another friend, are having the exact same issue and it is really frustrating. we think we've narrowed it down to a function called "onRequestPermissionsResult" in the app>src>main>com.jasonette.seed>Core>JasonViewActivity.java file. it seems like it has a line of code in the if statement for camera but nothing for location/gps. we don't know if this is the source of the issue for sure or what lines to add after the cameraManager one.

@clsource
Copy link
Contributor

jasonelle-archive#19 maybe that pr helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants