From the course: Building Android Apps with AWS

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create DynamoDB classes

Create DynamoDB classes

From the course: Building Android Apps with AWS

Start my 1-month free trial

Create DynamoDB classes

- [Lecturer] So now that we've imported those model objects that we downloaded from the mobile hub, the next thing that we're going to do is create a couple of new classes that will help us communicate with the database. So I'm here in my AWSProvider class and I'm going to add a couple of new properties. First one I'm gonna call dbClient, and that's gonna be an instance of AmazonDynamoDBClient. And what that object will do is handle the network communication between our project and DynamoDB. Then I'm going to add another property, I'm gonna call that dbMapper, which is an instance of DynamoDBMapper, and that object will handle the mapping between our database and our ListNamesDO and ListItemsDO objects. So now I'll write an accessor method that'll return our AmazonDynamoDBClient, and initialize it if necessary, and I'll just call that function getAmazonDynamoDBClient. So if our client is null, I'll create one, and to create the client we need what's called a credentialsProvider…

Contents