国产手机没有google services 和google play崩溃,判断google services是否存在
- 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;
- }
- }