WebApplications: Enable Geolocation in an Android WebView

Standard

Recently I got amazed by the wonderful world of Web Applications!

It is an amazing world where your application can be run in multiple platforms such as Android, Windows Mobile, iOS and generally every platform/operating system which supports HTML5.

A handy and really useful step by step guide can be found at Mozilla Developer Network.

So tonight I decided to build my first cross platform web application which involves geolocation and google maps API. After I succeed building and running my webapp on Firefox it was time to port it in Android. Generally Anrdoid users think that if the software is not in Play Store (android market) this is not an Application! So I had to create a simple Android application where I had to include only a WebView loading my app’s url.

Simple enough, don’t you think?

Wrong!

The past few hours I am trying to figure out how to enable geolocation in WebView with out any luck! Every guide, question, blog post regarding geolocation and WebView was always missing something.

Finally after a lot of search I found David Chandler’s detailed and fully operational example which saved my night!

There is no need to republish the hole blog post here so take your time and enjoy his beautiful work.

Enjoy 🙂

 

 

 

Advertisements

3 thoughts on “WebApplications: Enable Geolocation in an Android WebView

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s