I am trying to do a feasiblility test on google map in android.
Google Maps Android V1
When using MapView we have to add
<uses-library android:name="com.google.android.maps" />
in androidmenifest.xml. But as far as i know, there are some devices that do not have this library embed. So the application could not even be installed in these devices.
Google Maps Android V2
In V2 the map is supported by the sdk of extra/google_play_services. This approach is better but it still rely on the google play service. If i uninstall the service an alert message will appear like the following sreenshot.
And when i clicked the button, it crashed and throwed an exception.
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=http://play.google.com/store/apps/details?id=com.google.android.gms flg=0x80000 pkg=com.android.vending }
It is because that it cannot find google play, which also is uninstalled before the test, to handle the Intent. But the intent could be handled by brower without specifying pkg=com.android.vending.
So.. here is my question.
Is it possible to intercept and handle the above Intent by my own app? So i can pass it to brower.
If it is not possible, what is the best solution to develop android app with map. I know there are many android devices that do not have Google Map or Google Play installed, crash in use cannot be acceptable.
Actually, the problem relates to Gingerbread and older phones using the wrong URI if they don't already have the Play Store installed. This isn't a safe assumption. Most out-of-the-box Gingerbread phones don't come with it, and Google updates don't necessarily install it. This is a known bug in Google Play services V2. See the discussion on Google Code
A hack to get around it is discussed, but you'd need to intercept the button press to use it.
You need to use google map api to run google map . Create AVD with google api and run your project in that AVD (Emulator).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With