I am just about complete building an application. I've tested it on 1.6-2.3 android versions. My concern is how to distribute it. Does each phone already have the google apis installed? In particular one portion of my application is using the com.google.android.maps.* features. When developing I have to use a separate google apis library for each android version. Do I need to bundle the library for each version with my application?
Thanks in advance for any insight into this matter.
Does each phone already have the google apis installed?
No. However, I have not encountered any device that has the Android Market and does not have Google Maps. Hence, AFAIK, if you are only distributing via Android Market, most if not all of your users will have Google Maps.
When developing I have to use a separate google apis library for each android version.
No, you don't.
The target you choose in your build process (e.g., the target option in Eclipse) needs to be one with Google Maps, so your references to MapActivity and such resolve. Beyond that, set your target to match the highest API you are trying to use.
Do I need to bundle the library for each version with my application?
You are never bundling the library. The library is on the device.
Related
I am researching what minimum versions of Android OS are required by popular apps in the Google Play store, but I'm having trouble finding that information for certain apps whose minimum OS version "varies by device", as in this screenshot of the Facebook app:
I know I can answer my question by exhaustively attempting to install the apps on devices running different OS versions, but this would be a monumental task if, say, you wanted to find out the minimum version for a list of 10 apps.
Is there an easy way to find out what the minimum Android version is for different device models in Google Play?
There seems to be no proper way of getting all data for all devices. I found some info about how Google Play makes this data available here: https://developer.android.com/google/play/filters#filtering-on-the-google-play-web-site.
So there is no better way than to try with different devices. One possible way of making this less tedious is to log in with a Google account on multiple devices (you can even log in on emulated devices) running different Android versions. You should then see which devices from your list support an app on the app's page on the Google Play website.
Original answer:
When I open an app's page in chrome on Windows, I can just scroll down and see
ADDITIONAL INFORMATION -> Requires Android -> x.x and up
I think inside the Google Play app itself, you can only find apps your device (on which Google Play is installed) supports.
When you creates new project in Android Studio, there you can find the versions, with that you can create an app
Also you can look in version distribution to see, what versions are currently in use.
And in wikipedia you can look, which verisons are supported and what name is what API level
With support of 26+ you will create an app for almost 80% of all android users (at april 2021)
I have a Service running which gets the users location periodically. I have just migrated all the code over to support Android O. Ie. I got rid of FusedLocationAPI and GoogleApiClient. I have replaced them with FusedLocationProviderClient instead, according to the guidelines here:
https://developer.android.com/training/location/receive-location-updates.html
My question is how should I make sure my app supports all android APIs - everything up to O. From my testing the new location API still works on versions earlier than O, but it seems that to run it, the users phone must have the newest update of Google Play Store. So it seems I should check play store version: if (not newest play-store and version < Android-O) use fusedLocationAPI, else if (newest play-store and version>=O) use FusedLocationProviderClient.
Anyone have any input on supporting as many devices as possible?
AFAIK, you're correct that the device must have the newest update of Google Play Store to use Android O apps. You may check this documentation which discussed on how to support different platform versions.
In order to provide the best features and functionality across several Android versions, you should use the Android Support Library in your app, which allows you to use several recent platform APIs on older versions.
When using an app that depends on the SPen SDK library, why must the user download the SPen SDK from the Google Play store first? Can't the SDK be included in the original app?
This must be something new. I don't remember that being the case when I played with it. Also, are you sure it's making you download it from Google Play and not from its own Samsung app store.
That being said, I can see a reason for doing that. By making the SDK library an application, Samsung can update the library code much more easily when it needs to change (instead of relying on the third party developer to do it).
I suppose Samsung could embed the library in its own custom ROM instead, but that update mechanism too would be at the mercy of the carriers.
This link answers the question I think.
So far, I used the regular SDK in most projects, and used Google API SDK only when the project will utilize some of Google's feature.
I am now wondering is there a good reason I should NOT always use Google API SDK?
There are devices without Google services installed. In this case the Google API is not available. By not using the Google API SDK, your app can still run on these devices.
E.g. consider the Kindle Fire, it doesn’t have the Play store installed, as well as various low-budget tablets and Chinese phones. Custom builds from the open-source code such as Cyanogenmod also don’t have the Google apps installed (although many users add them manually).
Although Android itself is open-source, the Google apps require the vendor to get a license from Google. I know this because custom builds were asked by Google to not include their apps. Also having their own store instead of the Play Store is attractive for some manufacturers because then they get a share of the revenue instead of letting Google have all the profits. This is why not all devices have them.
One potential reason is this: why should you include something if you aren't using it? When you write a new class, do you import the entirety of the Android framework? No, you wouldn't, because at worst it could cause problems in your code, and even in the best case it takes up extra space in your resulting APK.
I'm not sure how much additional space would be taken up in memory/storage by building your app using the Google API SDK, but I can't imagine it's 0, and in mobile development you can't really afford not to be judicious with resource usage.
I have a panda board and Android 4.0 is running on it. Now I want to install my custom app on the board via ADB but the error INSTALL_FAILED_MISSING_SHARED_LIBRARY occurs.
The reason is that my custom app uses google maps and the google apps respectively the google libs a are not integrated in the android build.
Is it possible to install the google apps/libraries later?
Is it in general possible to bring the google libs to an embedded board or is it not allowed?
Thanks
Google owns the rights to these libraries and I'm pretty sure you need pass the Android Compatibility Tests before Google will officially let you use them on your device (this is what all the device manufacturers have to do AFAIK). It is possible to install the libs unofficially.
In general, I would say Yes to (1) and No to (2) unless you have Google's permission.
However, if your application's main functionality doesn't rely too heavily on Google's services, you can add the line below to your manifest, which will allow you to install the app. However, you will need to account for Google's services not being provided on your device and fallback or disable certain parts of your app.
<use-library android:name="com.google....."
android:required="false" />