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

  1. public static boolean isGooglePlayServiceAvailable (Context context) {  
  2.     int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);  
  3.     if (status == ConnectionResult.SUCCESS) {  
  4.         Log.e("YXH", "GooglePlayServicesUtil service is available.");  
  5.         return true;  
  6.     } else {  
  7.         Log.e("YXH", "GooglePlayServicesUtil service is NOT available.");  
  8.         return false;  
  9.     }  
  10. }
原文地址:https://www.cnblogs.com/qianyukun/p/6611527.html