Select to view content in your preferred language

Locate Button in android project

1023
4
Jump to solution
04-16-2014 11:29 PM
ArowanaIndah
Deactivated User
Hi, i'm using Locate Button sample in my android project. I save it as html file in my assets folder "file:///android_asset/index.html" and run it in my android webview. When i run it in my android, i can see the map but when i click the locate button it not working.
Did android support LocateButton widget or may be i miss something?

Thank
0 Kudos
1 Solution

Accepted Solutions
ArowanaIndah
Deactivated User
Hi,
I guess it about enable geolocation in a webView. There is sample in http://turbomanage.wordpress.com/2012/04/23/how-to-enable-geolocation-in-a-webview-android/ and it solved the problem.

Thank.

View solution in original post

0 Kudos
4 Replies
JonathanUihlein
Esri Regular Contributor
This is really difficult to troubleshoot!   

Were there any error messages in the console when you pressed the button?  

Did you confirm that the sample works from a web-server?
0 Kudos
ArowanaIndah
Deactivated User
Hi thank for reply,
There is no error messages when i click the locate button in my android application and i run the sample from "http://developers.arcgis.com/javascript/samples/widget_locate/" using android browser and it show current location.
0 Kudos
ArowanaIndah
Deactivated User
Hi,
I guess it about enable geolocation in a webView. There is sample in http://turbomanage.wordpress.com/2012/04/23/how-to-enable-geolocation-in-a-webview-android/ and it solved the problem.

Thank.
0 Kudos
JonathanUihlein
Esri Regular Contributor
Hi,
I guess it about enable geolocation in a webView. There is sample in http://turbomanage.wordpress.com/2012/04/23/how-to-enable-geolocation-in-a-webview-android/ and it solved the problem.

Thank.


Glad you found a solution!

I figured it would be an Android issue and not a JSAPI issue 😉
0 Kudos