Search in sources :

Example 1 with UnsubscribeFailedException

use of com.amazonaws.mobileconnectors.cognito.exceptions.UnsubscribeFailedException in project amazon-cognito-android by aws.

the class CognitoSyncStorage method unsubscribeFromDataset.

@Override
public void unsubscribeFromDataset(String datasetName, String deviceId) {
    String identityId = provider.getIdentityId();
    UnsubscribeFromDatasetRequest request = new UnsubscribeFromDatasetRequest().withIdentityPoolId(provider.getIdentityPoolId()).withIdentityId(identityId).withDatasetName(datasetName).withDeviceId(deviceId);
    try {
        client.unsubscribeFromDataset(request);
    } catch (AmazonClientException ace) {
        Log.e(TAG, "Failed to unsubscribe from dataset", ace);
        throw new UnsubscribeFailedException("Failed to unsubscribe from dataset", ace);
    }
}
Also used : UnsubscribeFromDatasetRequest(com.amazonaws.services.cognitosync.model.UnsubscribeFromDatasetRequest) UnsubscribeFailedException(com.amazonaws.mobileconnectors.cognito.exceptions.UnsubscribeFailedException) AmazonClientException(com.amazonaws.AmazonClientException)

Aggregations

AmazonClientException (com.amazonaws.AmazonClientException)1 UnsubscribeFailedException (com.amazonaws.mobileconnectors.cognito.exceptions.UnsubscribeFailedException)1 UnsubscribeFromDatasetRequest (com.amazonaws.services.cognitosync.model.UnsubscribeFromDatasetRequest)1