So I am trying to create a new table in AWS dynamoDB, but I cannot find anywhere in the documentation that shows how to create a unique ID for android. They show how to get the user cognito ID: AWSMobileClient.defaultMobileClient().getIdentityManager().getCachedUserID()
, But I am not creating a new user here, I am creating a new Group, so I want a completely unique ID for every table that I create. Does anyone know how I can do this? I have scoured the internet for this but can't seem to find the answer. The answer in objective-c is very simple, which is found using this: [AWSIdentityManager defaultIdentityManager].identityId;
, please tell me there is something like this for the android version. Your help is greatly appreciated.
Figured it out. Had to go into my GroupsDO model and add @DynamoDBAutoGeneratedKey above the groupId section, and it would automatically generate a unique id on save.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.