I’m trying to do a pretty straightforward google maps feature for my mobile web app.
after some searching i found that just opening a href to maps.google.com?q=query in webview would show a very decent map.
The mobile version of google.maps has a “current location” feature which i cant get to work. so i’m thinking it might need some permission, but i find so little information about it. Does anyone know how to get this function working? when i click the button, nothing really happens.
in my manifest i have this :
<uses-permission android:name="android.permission.INTERNET" />
<uses-configuration android:reqKeyboardType="undefined" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<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" />
And the entire thing loads in webview. Any pointers greatly appreciated 🙂
Turns up that my webview just simply wouldnt allow me to do what i wanted.
I ended up solving it by handling google.maps url’s through device browser\maps application within “shouldoverrideurlloading”. Like so :
And adding the intent to androidmanifest: