Code example for ConnectionResult

Methods: getErrorCode, hasResolution

0
 
	} 
 
	@Override 
	public void onConnectionFailed(ConnectionResult result) {
		if (result.hasResolution()) {
			try { 
				result.startResolutionForResult(getActivity(), CONNECTION_FAILURE_RESOLUTION_REQUEST);
			} catch (SendIntentException e) {
				// TODO Auto-generated catch block 
				e.printStackTrace();
			} 
		} 
		else { 
			showErrorDialog(result.getErrorCode());
		} 
 
	} 
 
	private void showErrorDialog(int errorCode) {
		// create and show an error dialog