Page updated Apr 17, 2024

Use AWS SDK

Amplify Android v1 is now in Maintenance Mode until May 31st, 2024. This means that we will continue to include updates to ensure compatibility with backend services and security. No new features will be introduced in v1.

Please use the latest version (v2) of Amplify Library for Android to get started.

If you are currently using v1, follow these instructions to upgrade to v2.

Amplify libraries should be used for all new cloud connected applications. If you are currently using the AWS Mobile SDK for Android, you can access the documentation here.

If you need functionality in the AWS services used by the Amplify Predictions category that isn't available, we provide an escape hatch so you can get a reference to that service. For example, to get a reference to AmazonRekognitionClient:

1// Obtain reference to the plugin
2AWSPredictionsPlugin predictionsPlugin = (AWSPredictionsPlugin)
3 Amplify.Predictions.getPlugin("awsPredictionsPlugin");
4AWSPredictionsEscapeHatch escapeHatch = predictionsPlugin.getEscapeHatch();
5
6// Send a new request to the Rekognition endpoint directly using the client
7AmazonRekognitionClient client = escapeHatch.getRekognitionClient();
8CreateCollectionRequest request = new CreateCollectionRequest()
9 .withCollectionId("<new-collection-id-here>");
10client.createCollection(request);
1// Obtain reference to the plugin
2val plugin = Amplify.Predictions.getPlugin("awsPredictionsPlugin")
3val escapeHatch = (plugin as AWSPredictionsPlugin).escapeHatch
4
5// Send a new request to the Rekognition endpoint directly using the client
6val client = escapeHatch.rekognitionClient
7val request = CreateCollectionRequest().withCollectionId("<new-collection-id-here>")
8
9client.createCollection(request)

API Documentation Resources