Answers for "google service check in android"

0

google service check in android

private fun checkGooglePlayServices(): Boolean {
  // 1
  val status = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this)
  // 2
  return if (status != ConnectionResult.SUCCESS) {
    Log.e(TAG, "Error")
    // ask user to update google play services and manage the error.
    false
  } else {
    // 3
    Log.i(TAG, "Google play services updated")
    true
  }
}
Posted by: Guest on April-25-2022

Code answers related to "google service check in android"

Browse Popular Code Answers by Language