国产手机没有google services 和google play崩溃,判断google services是否存在

时间:2021-08-05 14:51:56
  • public static boolean isGooglePlayServiceAvailable (Context context) {  
  •     int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);  
  •     if (status == ConnectionResult.SUCCESS) {  
  •         Log.e("YXH", "GooglePlayServicesUtil service is available.");  
  •         return true;  
  •     } else {  
  •         Log.e("YXH", "GooglePlayServicesUtil service is NOT available.");  
  •         return false;  
  •     }  
  • }