0
Google Play 서비스를 사용할 수 있는지 여부를 확인하는 공통 기능을 만들려고합니다. 내가 공통적 인 기능을 만들고 있기 때문에 을 사용하고 있지 않다. 참조 번호는 Activity
이다.getErrorResolutionPendingIntent를 사용하여 Google Play 서비스를 확인하는 방법
나는 더 많은 옵션이 getErrorResolutionPendingIntent
처럼 보이지만 사용 방법을 모른다.
여기이 의도와 관련된 모든 작업을 수행 할 코드
public static boolean isGooglePlayServiceAvailable(Activity activity){
GoogleApiAvailability googleService = GoogleApiAvailability.getInstance();
int result = googleService.isGooglePlayServicesAvailable(getContext());
if(result != ConnectionResult.SUCCESS){
if(googleService.isUserResolvableError(result)){
PendingIntent pendingResults = googleService.getErrorResolutionPendingIntent(getContext(), new ConnectionResult(result));
}else{
Log.e(TAG , "Device not supported");
}
return false;
}
return true;
}
위의 코드에서 구현하려는 경우 사용 방법 – Hunt