国产手机没有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. }
posted @ 2017-03-24 14:57  Alter  阅读(2919)  评论(0编辑  收藏  举报