January 2014
Intermediate to advanced
736 pages
70h 43m
English
Nested class LoadContactTask (Fig. 8.49) extends class AsyncTask and defines how to interact with the database to get one contact’s information for display. In this case the three generic type parameters are:
• Long for the variable-length argument list passed to AsyncTask’s doInBackground method. This will contain the row ID needed to locate one contact.
• Object for the variable-length argument list passed to AsyncTask’s onProgressUpdate method, which we don’t use in this example.
• Cursor for the type of the task’s result, which is passed to the AsyncTask’s on-PostExecute method.
148 // performs database query outside GUI thread149 private class LoadContactTask ...
Read now
Unlock full access