Use google map on any devices. (without google play ) - android

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).

Related

Google Maps not showing on android v2.2

I am building an application which has its major functionality on google maps. But the problem I am facing in one of the device is that:
The Google Maps never load on that device [its OS is Android v2.2]
I have checked for the Google Play Service and it always gives a dialog to update the Google Play service; but when I click ok it redirects me to the play store where it shows that i already have the google play library [No update option there]
I connected the device and checked the logcat which states something like this:
"Current Google Play Service Version is 35xxx and required is 41xxx"
but there is No way for me to update the google play service as it never shows the update option. Please help me with this issue.
Give me all possible solution that i should try out... I need this app working on android 2.2.
I am using google maps api v2. Also Note the app is working fine on all other android versions.
Thanks.
USING Google Maps v1 can SOLVE MY PROBLEM....?? Please Help!
You need to use older version of Google Maps Android API v2.
The latest supported on 2.2 devices is 3.2.65 (v12) and can be downloaded via SDK Manager.
Just look for Google Play services for Froyo.
Or if you are using Android Studio and Gradle, make your dependency version equal to 3.2.65.

Android App to BlackBerry Playbook - Google Maps Issue

I'm porting my android app to playbook and keep getting an error related to not supporting Google Maps, however I don't use that anywhere in my project. It's also not mentioned anywhere in my manifest.
I'm at a loss here, not sure what to do next. Any ideas?
Just to update on this: I was able to compile and run the app on the emulator w/ that warning present so - lets see if it gets past approval process, will update.
The Google Maps API for Android is unsupported on the Blackberry Playbook. See https://bdsc.webapps.blackberry.com/android/apisupport/ for a list of what can and cannot be ported.
For now, there is no way around this. If you want to create a Google Maps application for the Playbook, you will need to use the AIR SDK with the Google Maps Flash API

Google Analytics and Google Map on Android

I am displaying maps in my Android Application. Nowhere in my application I have explicitly invoked www.google-analytics.com, yet I see lots of request going to this website.This is causing my application to be very slow. Also many times I get errors like Unresolved host www.google-analytics.com.
Is it mandatory for the functioning for Google Maps in Android or can we turn this off?
Thanks
I guess if Google Maps is using some Google analytics internally, there isnt much that u can do

INSTALL_FAILED_MISSING_SHARED_LIBRARY

I have a map application. I want to install it on a device having no maps library available. Can't I burn in along the app.
No, you can't "burn in along the app", unless you're a pirate. Google Maps is software that is licensed by device manufacturers or is obtained from the Android Market. If a device does not have it, there is nothing you can do about that fact.
There is an undocumented android:required attribute on the <uses-library> element. However, we have been told it is safe to use, that it being missing from the documentation is merely a documentation bug. You can use android:required="false" to allow your app to run on a device that lacks Google Maps. This does not magically add Google Maps, though, and so if you try to start a MapActivity, it will crash. But, using Class.forName(), you can see if MapActivity exists, and if it does not, do something else for your maps (e.g., WebView and Web-based Google Maps, OpenStreetMap).

Android app using Google Maps library, installable everywhere

Is it possible to use Google Maps Android library in my app in a way, that the app can be installed even on phones without Google Maps? On phones without Google Maps, the maps feature would be disabled.
Is it possible to use Google Maps Android library in my app in a way, that the app can be installed even on
phones without Google Maps?
There is an undocumented android:required="false" flag you can put on the <uses-library> element. I am hopeful that they will document this in a future release. With that set to false, you would need to use reflection to see if Google Maps is loaded (e.g., try to find the MapView class) -- if not, disable whatever would lead the user to a map.
If anybody else has the same problem (I do):
On this Android Developer page it says -- as far as I can tell -- that you can reference the Maps API and thus have e.g. a map activity in your app by using Google Play services:
"The Google Maps Android APIs are not included in the Android
platform, but are available on any device with the Google Play Store
running Android 2.2 or higher, through Google Play
services.
To integrate Google Maps into your app, you need to install the Google
Play services libraries for your Android SDK. For more details, read
about Google Play
services."
Apparently it is an actual app (it is installed on my phone) that updates certain Google stuff.
So it seems it is possible, but only for devices running Android 2.2 (API level 8) and above.
I find the explanation on that site a bit unclear, however, and I have not been able to test this on my own.
In my case, I guess I have to live with the fact that not all devices will be able to install my app, since I target an API < 8.

Categories

Resources