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.
Creating an Azure query task
From the course: Building Android Apps with Azure
Creating an Azure query task
- [Instructor] Now we are ready to create our Azure query. Let's go into the Azure client lib gradle module again, and under com dot example dot Azure client lib, let's right mouse on that and select new Java class and the name of our class will be Azure query. Azure query will also extend async tasks, so let's add that in under super class. Click on okay. The async task for Azure query will take in three parameters, as well. The first one is Azure request params. Second one is void, and the last one will be a list of bookmarks. Now let's press control O, and just like before, let's select on pre-execute. Let's press command key. And also select on post execute and do in background. Let's go down to line 23. So instead of returning null, our background task will be Azure request params, element zero, get query, and the listener method will be do background query. Do background query also throws some exceptions that we added in the interface method, so let's handle that here. Let's…
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.