January 2014
Intermediate to advanced
736 pages
70h 43m
English
Method getOneContact (Fig. 8.56) also uses SqLiteDatabase’s query method to query the database. In this case, we retrieve all the columns in the database for the contact with the specified ID.
87 // return a Cursor containing specified contact's information88 public Cursor getOneContact(long id)89 {90 return database.query(91 "contacts", null, "_id=" + id, null, null, null, null);92 }93
Fig. 8.56 | DatabaseConnector method getOneContact.
Read now
Unlock full access