From the course: Building Android Apps with Azure
Unlock this course with a free trial
Join today to access over 22,400 courses taught by industry experts.
Create AzureTableRepo
From the course: Building Android Apps with Azure
Create AzureTableRepo
- [Instructor] We want to organize our code to more easily work with the Azure Table, and we also want to set up for offline sync in a later chapter. To better accomplish both these goals, we will be creating repo classes. So let's select the Azure client with gradle module, and under com dot example dot azureclientlib. Let's right-mouse, and select New, Package. The name of our package will be repo. Let's select the repo package, and right-mouse, select New, Java Class. We will create an interface, first. So let's call this iAzureRepo, and the type will be interface. Now let's click OK. At the end of line three, let's insert a new line. Our first interface method, we'll return Bookmark. The name of our method will be addItemIntoTable. We will pass in Bookmark as our input parameter, and I will call it item. This method will also throw some exceptions, so let's add them here. The first one is ExecutionException, the next one is InterruptedException. I'm gonna close the project window…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.