android : The minimum google play service version for mobile vision ocr? - android

I am developing an application and using Mobile Vision Api for text recognizing.I noticed that its not working in some devices.After searched I understand that one reason is because of google play service version that is installed on user device.So I know that I can get the version that is installed on user device like this :
int v = getPackageManager().getPackageInfo("com.google.android.gms", 0 ).versionCode;
but what is the minimum version that i have to check on user device to notice to the user to update the google play service on device(if necessary)?

I think this question is related to your post here.
There seems to be no minimum GPS version specified from the Overview of Google Play Services however it is recommended you update to the lastest as:
Google Play services gives you the freedom to use the newest APIs for
popular Google services without worrying about device support. Updates
to Google Play services are distributed automatically by the Google
Play Store and new versions of the client library are delivered
through the Android SDK Manager. This makes it easy for you to focus
on what's important: your users' experience.

Related

Android : How to check google play service version for mobile vision api

I am developing an application and using Mobile Vision Api for text recognizing.I noticed that its not working in some devices.After searched I understand that one reason is because of google play service version that is installed on device.So how can I check the google play service version that is installed on user device?
And what is the minimum google play service version that this api could work?
You can use this for checking version
GoogleApiAvailability.GOOGLE_PLAY_SERVICES_VERSION_CODE
I think, first you should check, if service is available ?
public int isGooglePlayServicesAvailable (Context context)
Google Doc
How to know GPS version of your phone?
If manually, go to Settings > Applications > Google Play Services.
If programatically, follow the answer in this SO thread:
int v = getPackageManager().getPackageInfo("com.google.android.gms", 0 ).versionCode;
What is the minimum google play service version for this API?
Minimum Android version required is Android 2.3 (Gingerbread).

What is minimum version of Google Play Services to use Firebase?

Background
I'm developing an app using Firebase features (Realtime Database, Firebase Messaging, Analytics, Crash Reporting and Auth [Facebook]). In my country, most of the users don't have wifi and rarely upgrade apps (including Google Play Services).
Question
As the title suggests, I would like to know the minimum version (the lowest). I'm also willing to remove some features if it will help to lower the Google Play Services version.
Do I need to check google play service version in my application code or will Firebase check for me?
Finding so far and I'm confused,
This post say min version is 9.0
This post say min version is 8.1.15
This SO question say developer no need to check Google Play Services
but, This doc say developer need to check Google Play Services
The most trustworthy site says 9.0
For a list of the libraries available for the different Firebase features, see Firebase libraries. The following features are now part of Firebase in the Google Play Services 9.0 SDK.
The current stable is 9.4.
https://firebase.google.com/support/releases

Firebase for Play Services below 9

The Background
My app is heavily dependent on Firebase. I use most of the services like Authentication, Realtime database, Storage, Analytics, Crash Reporting and more.
Everything works fine so far, but I have a doubt regarding a particular scenario.
The Problem
As Firebase was introduced in Play Services 9, what will happen to those devices who have still not updated to Play Services 9.
How will my app work on those devices as my app is heavily dependent on Firebase?
How does Firebase cater to the scenario of backporting?
Or should the developers some how check the version of Play Services and request the user to update?
How will my app work on those devices as my app is heavily dependent on Firebase?
When installing the application, it will prompt them a message saying that this app requires a higher version of Play Services. So it will work properly.
How does Firebase cater to the scenario of backporting?
Firebase needs a minimum API of 9. If the device doesn't support anything that's missing from the device, it will simply tell them, so you don't have to worry.
Or should the developers some how check the version of Play Services and request the user to update?
NO, Android does this for you.
i have edited my answer to make things a bit more clear
1. How will my app work on those devices as my app is heavily dependent on Firebase?
Android automatically checks for the play services version that is currently installed in the user's device and prompts the user to update to the play services version that the application was built with Firebase.
2. How does Firebase cater to the scenario of backporting?
Firebase explicitly outlines the latest version of play services as a prerequisite for building with it, there is no information on the docs about back porting so I don't think it is possible at the moment.
3. Or should the developers some how check the version of Play Services and request the user to update?
I wouldn't recommend this as Android already checks and pops up a play services error. However it is quite possible to check the version of play services and request the user to first update it in order to use your application, more info on this can be found on this link isGooglePlayServicesAvailable(Context)

limitation on FusedLocationProviderApi Android

My app is using android.location.LocationManager to get network and gps locaitions. Due to high battery consumption. I decided to switch to FusedLocationProviderApi. I'm worried about the impact on current users. Since this api requires google play service. is there any statistics on what percentage of android devices have google play service installed? is there any other things to consider that might cause current users unable to use the app after switch?
If the user is able to access play store , the google play services are installed.
below is the play services description from play store
'Google Play services is used to update Google apps and apps from Google Play. This component provides core functionality like authentication to your Google services, synchronized contacts, access to all the latest user privacy settings, and higher quality, lower-powered location based services. Google Play services also enhances your app experience. It speeds up offline searches, provides more immersive maps, and improves gaming experiences. Apps may not work if you uninstall Google Play services.'
https://android.stackexchange.com/questions/97145/get-rid-of-google-play-services
https://android.stackexchange.com/questions/104842/is-it-safe-to-uninstall-google-play-services-app

Do you really need to check for Google Play services to use AdMob?

Google's instructions here say that if you want to use AdMob in your Android app via Google Play services you must ensure the user's device has the Google Play services APK installed. However, I'm having terrible trouble trying to get this working; and I've noticed that even if I uninstall the Google Play services updates on my phone (and don't bother checking if the services is available) my app is still perfectly able to retrieve and display ads! This is despite errors in LogCat like the following:
W/GooglePlayServicesUtil(26558): Google Play services out of date. Requires 4132500 but found 3159130
Presumably my phone still has the original version of Google Play services installed when it came out the factory. I'm just wondering whether I really need to check for Google Play services being available to use AdMob successfully. Right now it appears not. Please can someone tell me why I should bother having to make this check. Is it to handle case 4 at that Google link I gave above...?
The Google Play services APK is missing or disabled on the device, which might happen if the user explicitly uninstalls or disables it.
TL;DR - You do NOT need to check for Google Play services to use the Mobile Ads APIs.
The Google Mobile Ads offering in Google Play services is unique from most (all?) of the other libraries in Google Play services in that it CAN work without the service APK installed on the device.
If the APK installed on the device is a more recent version, the library will load the classes from the APK service and use these newer classes to request ads. Otherwise, the version of Google Play services that you compile in your app is sufficient to fetch ads.
The benefit here is that you effectively will always run against the latest version of the library when the device has the service installed. And in the case that your service version is older than the version you compiled your app against (ex: your example above) or in the case where there is no service on the device (ex: Kindle Fire), the library compiled with your app can still do the ad fetching, but you'll still have to pull in updates manually.
The logcat error you are getting is for either case 2 or 3.
Whether Admob craps out on case 4 is interesting. I suspect it will be ok because the old Admob classes ship with the GPS library so in worse case it could fall back to using their pathway.

Categories

Resources