Amazon Cognito example for Android with mobile SDK

In this example, we will perform some tasks such as create new user, request confirmation code for new user through email, confirm user, user login, and so on.

  • Create a Cognito User Pool:

To create a User Pool with the default configuration, you have to pass parameters to the CognitoUserPool constructor, such as application context, userPoolId, clientId, clientSecret, and cognitoRegion (optional):

CognitoUserPool userPool = new CognitoUserPool(context, userPoolId, clientId, clientSecret, cognitoRegion);
  • New user sign-up:

Please perform the following steps to sign up new users:

Collect information from users such as username, password, given name, phone number, and email address. Now, ...

Get Expert AWS Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.