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; }
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; }