I want to use new Face Detection feature of Google Play Services, it has introduced in 7.8 version. I want to know if I release my app, would it work on phones with older version of Google Play Services, if not would it crash or?
Functions in the GoogleApiAvailability class.
Helper class for verifying that the Google Play services APK is available and up-to-date on this device
Use the isGooglePlayServicesAvailable
method.
public int isGooglePlayServicesAvailable (Context context)
Verifies that Google Play services is installed and enabled on this device, and that the version installed on this device is no older than the one required by this client.
The isUserResolvableError
and getErrorDialog
methods can then be used to install the latest version from Play Store if required.
It would indeed crash on an older phone since there will be methods in the newer version not in the older one. Just make sure you have an exception for handling an older version - or alternatively set the minimum required version of Android for your application higher.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.