Пример #1
0
 public static Contact getLast(Context ctx) {
   ContactDatabase contactDb = new ContactDatabase(ctx);
   Cursor c = contactDb.getLast();
   Contact contact = new Contact(ctx);
   contact.extract(c);
   return contact;
 }
Пример #2
0
 public static Contact getById(Context ctx, int id) {
   ContactDatabase contactDb = new ContactDatabase(ctx);
   Cursor c = contactDb.get(id);
   Contact contact = new Contact(ctx);
   contact.extract(c);
   Log.v("message", "contact something is" + contact.getId());
   return contact;
 }