I had query title column from database and want to set it in TextView in GridView.
How?
CafeDatasource
public List<Model_Insert> findTblCafe(){
List<Model_Insert> model_Inserts = new ArrayList<Model_Insert>();
Cursor cursor = database.query(CafeDbOpenHelper.TABLE_CAFE, rtv_tbl_Cafe,
null, null, null, null, null);
Log.i("number", "return" + cursor.getCo
Basically I have a method that populates a listview from my database.
I am receiving both null pointers on a cursor and 'unable to stop activity' errors.
This is how I am returning my cursor:
public Cursor getAppointmentsData() {
String[] columns = new String[] { KEY_ROWAPPID, KEY_NAMEAPP,
KEY_TYPEAPP, KEY_TIMEAPP, KEY_DATEAPP, KEY_COMMENTAPP };
Cursor c = ourDatabase.query(
I want to choose a random data from database and display in textview.
I'm working on dictionary database, I insert the query when the activity is first launch, it works smoothly, and at the next launch I want to prevent the insertion for the second time, I use this method to prevent insertion by checking whether the row is null or not, but it always rise a java null pointer exception in my logcat.
public boolean isEmpty()
{
boolean empty = false;
Cursor cur
The follow statement give me cursor.moveToNexe() == false. Does anyone know what is the matter? Many thanks.
I am doing alarm Project,
I want to set one time alarm..
I'm still a bit of a noob regarding this. I'm puzzled about what's happening. I stored a 3.542 in a sqlite database. Checking the database with Firefox sqlite viewer confirmed this.
I am able to select one contact and get its respective phone number.
code:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
if (requestCode == PICK_CONTACT_REQUEST) {
if (resultCode == RESULT_OK) {
Uri contactUri = data.getData();
String[] projection = { Phone.NUMBER };
Cursor cursor = getContentResolver()
I have a problem with extern sql lite database, when I called this function :
private void updateMapOverlay() {
List<Overlay> mapOverlays = gmap.getOverlays();
Drawable drawable = getResources().getDrawable(R.drawable.ic_launcher);
//mapOverlays.clear();
overlay = new OverlayList(drawable, this);
mapOverlays.add(overlay);
Cursor cursor = db.g