如果用户使用旧版本的 Google Play 服务,使用新版本 Google Play 服务的功能会导致应用程序崩溃吗?
Would using features of newer version of Google Play Services crash the app, if user has older version of the Google Play Services?
我想使用 Google Play 服务的新人脸检测功能,它已在 7.8 版本中引入。我想知道如果我发布我的应用程序,它是否可以在具有旧版本 Google Play 服务的手机上运行,如果不能,它会崩溃还是?
它确实会在较旧的 phone 上崩溃,因为新版本中有方法,旧版本中没有。只需确保您有处理旧版本的例外 - 或者将您的应用程序所需的最低版本 Android 设置得更高。
GoogleApiAvailabilityclass中的函数。
Helper class for verifying that the Google Play services APK is
available and up-to-date on this device
使用isGooglePlayServicesAvailable
方法。
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.
如果需要,可以使用 isUserResolvableError
和 getErrorDialog
方法从 Play 商店安装最新版本。
我想使用 Google Play 服务的新人脸检测功能,它已在 7.8 版本中引入。我想知道如果我发布我的应用程序,它是否可以在具有旧版本 Google Play 服务的手机上运行,如果不能,它会崩溃还是?
它确实会在较旧的 phone 上崩溃,因为新版本中有方法,旧版本中没有。只需确保您有处理旧版本的例外 - 或者将您的应用程序所需的最低版本 Android 设置得更高。
GoogleApiAvailabilityclass中的函数。
Helper class for verifying that the Google Play services APK is available and up-to-date on this device
使用isGooglePlayServicesAvailable
方法。
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.
如果需要,可以使用 isUserResolvableError
和 getErrorDialog
方法从 Play 商店安装最新版本。