Get google apis in unsupported mobiles? - android

I have an android application that requires google maps api. I figured out that in some mobiles neither support google apis or google play by default.
By googling the workaround that I found was to add
<uses-library android:name="com.google.android.maps android:required="false"/>
This makes that app to be installed on those mobiles but doesnot support loading the maps.
So is there a way to add google apis externally and support google maps loading for those mobiles ?

So is there a way to add google apis externally and support google maps loading for those mobiles ?
No, except perhaps by rooting the device and installing pirated software.
Note that Maps V2 does not require pre-installed mapping APIs, though it does require the Play Services Framework, which in turn requires the Play Store.
If you want mapping support without these limitations, use something independent, like OpenStreetMap and OSMDroid.

Related

Is there any map sdk for android phone which is missing google play services

Some android phones from China are not installed google play services. So, I can't use google map for them. I would like to know that is there any map sdk for the phone like this.
There are two main flavours of Android that are not using Google Play Services. Amazon and Nokia forks of Android. But they provide their own Map SDKs. Do you know which kind of Android these phones run in China? If it's a fork by major players then they would be providing their own Map SDK as well.
That being said, OpenStreet map is a widely used open alternative of Google Maps and has a SDK that you can use. You can find more information on that here https://github.com/osmdroid/osmdroid

Which one to choose as Project build target ? Google APIs or SDK platform

I have been searching but couldn't find the difference between both of these things. I have read other questions in which people have said that we should use Google Apis as build target when we want to integrate Google Maps Api or use other Google apis.
The problem is that i am using maps on projects that were build on simple Android 4.4 not Google API (platform 4.4) and the maps are working just fine on my Galaxy s3.
How are they possibly working?
And if they are working then what is the difference between Google APIs and SDK platform?
Or is the difference only related to emulators?
It is really pointless to use the Google API's now because most if not all things included in that have been deprecated and moved to google play services. Selecting Google API will not do anything except maybe increase the size of your program. The difference being is in addition to the 4.4 SDK you would also get all the Google API stuff with it
You don't need (but it won't hurt you) to use Google APIs if you use Google Maps Android API v2. Google APIs is for when you work with deprecated Google Maps Android API v1 or you program USB.
The google API includes Google Maps and other Google-specific libraries. The Android one only includes core android libraries.
As for which one to choose, I would go with the Android API until you find that you need the Google API; such as when you need Google Maps functionality.
http://code.google.com/android/add-ons/google-apis/index.html is a link to the Google API page.

Amazon Maps API & Google Maps API

I have one Android app, which has been servicing on Google Play. Its main feature is using Google Maps. I am trying to port it to Amazon App store for Android. However, it is so confusing to use Maps. I would like to use one source code and support the below devices from Amazon App store.
All non-Amazon Android devices based on my manifest
Kindle Fire
Kindle Fire HD
Kindle Fire HD 8.9
If I use Amazon Maps API, does it support this devices (All non-Amazon Android devices based on my manifest)?? If I use Google Maps API, the Kindle Fire devices can not display maps?? Or should I use both Google Maps API and Amazon Maps API to support all devices, if so, how??
If someone has an experience for this, please give me how to port Google Play app which uses Google Maps API to Amazon App Store to support those above devices at once.
Thanks in advance.
Amazon does not support the Google Maps API of any version.. They use their own API which is nearly identical to the Google Maps v1 but is missing things like traffic and street view. So to answer your question, it is not possible to only build one map solution and work on both Kindle Fire devices and other non-Amazon Androids.
As for what devices the Amazon maps api supports it would be all of their Fire devices minus the first generation Fires which run a forked version of Android based on API 10.
It IS possible to build both an Amazon map and Google map in the same code base and decide at runtime which to utilize. Here is a nice little blog on some things to keep in mind when doing this.
Hope that gives you some direction!
Update: the Amazon Maps API has been updated to v2. Here is an article about how to migrate an app from Google Maps v2.
According to the article, the Amazon Maps API offers interface parity with version 2 of the Google Maps API and most classes and method calls in your Google Maps app work the same on Amazon devices. I will give it a try and see today.

Using Google Maps API v2 on devices without Google Play

Google Maps API V2 for Android is a big leap forward compared to v1: better rendering, fragment support... But there is one grey area I am trying to clarify about its use.
I look forward to create a map-based application for an Android device that does not have Google Play on it i.e. did not pass Google validation such as a low-end tablet or a car radio, and distrbute it on third-party markets.
Such applications using V1 API are possible.
The V2 has a dependency on Google Play Services, which is available to devices with Google Play only.
Does it mean that the V2 API is definitely unavailable for the aforementioned devices?
I look forward to create a map-based application for an Android device that does not have Google Play on it i.e. did not pass Google validation such as a low-end tablet or a car radio, and distrbute it on third-party markets. Such applications using V1 API are possible.
Only because the makers of those devices pirated the Maps code, as both Maps V1 and Maps V2 are only available for manufacturers who pass validation and license that code.
Does it mean that the V2 API is definitely unavailable for the aforementioned devices?
Barring similar piracy, yes.
You can try manually install the bin files that are required for Google maps, same way as you would do if you wanted to get the emulator running a Google Map API V2.
you can get more information on how it's done from the following blog post I wrote:
link
I don't know if this solution will be applicable for those devices but you can try it.

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