android-cursor Questions

2

Solved

I need save some objects in DB. I'm using this code in my Dao class. public void saveActions(List<Action> actionList) throws SQLException { for (Action action : actionList) { createOrUpda...
Liriodendron asked 3/9, 2014 at 8:2

2

Solved

I´ve developed an application, which goes through all contacts on android. It´s already published and currently installed on about ~800 devices. It is running on almost all devices without any prob...
Missive asked 26/4, 2013 at 19:50

2

I want to know what are the differences between CursorAdapter and SimpleCursorAdapter. Based on what criteria someone would choose the one or the other. Your experiences working with them? Thank yo...
Rew asked 5/12, 2011 at 8:27

2

I have a cursor returned on an onLoadFinished callback (from LoaderManager.LoaderCallbacks), and I want to do some (possibly costly) post-processing on this cursor. So, I'm firing off an AsyncTask ...
Justiceship asked 8/6, 2012 at 23:49

0

I'm trying to determine whether a given event exists in the user's calendar, where equality is determined by start time, end time, title, and location all matching. The documentation says: publi...
Incorrigible asked 29/4, 2014 at 18:33

2

Solved

I am trying to access a list-activity using custom adapter.I have tried it directly without using any custom adapter it was working good but because I want to add more functions in list-view I want...
Telethermometer asked 17/7, 2013 at 19:51

4

Solved

I usually tend to define the model layer of my apps using POJO's, such as Article, Comment, etc. I was about to implement an AlphabetIndexer in the adapter of one of my ListViews. Right now this a...
Entwistle asked 30/3, 2010 at 12:34

2

Solved

I am getting the below error when attempting to query my database with my custom ContentProvider shown below. I have confirmed the table exists with the correct name and it is still not working. ...

1

Solved

LogCat keeps on showing me a Cursor finalized without prior close() warning. I was using SQLite on a previous version of the app, but don't use it anymore. I tried to find the cause for thi...
Rattlebox asked 12/3, 2014 at 14:52

8

Solved

I have a Cursor that contains all rows from my database. That Cursor I pass to a CursorAdapter, and display the data in a list. But I need to show one extra element in the beginning. How can I do t...
Gibbsite asked 19/9, 2012 at 10:20

3

Solved

I'm creating an ExpandableListView with data from a database. For that, I'm using a CursorTreeAdapter and I populate it with a Cursor object which contains the data I retrieve from database. I tho...
Nuptial asked 3/7, 2012 at 1:23

4

I am using an SQLite database in my android application, and I have a function which selects the rows from a certain table: public Cursor getAllDiscounts() { // return db.query(table, colum...
Irremeable asked 3/12, 2012 at 19:28

1

Solved

how can I access columns with the same name? I have tried doing cursor.getString(cursor.getColumnIndexOrThrow("table.column")) but it doesn't seem to work
Excerpta asked 21/2, 2014 at 22:23

1

I want to get last visited URL in chrome and other browser's. I am able to get Last URL in android Native browser. I use following code for this - Cursor cur = getContentResolver().query(Browser....
Ditmore asked 9/12, 2013 at 7:23

4

Solved

Is there an easy way to display a ListView in reverse order? I am trying to create a conversation-based app, and would like the most recent entries to be at the bottom of the ListView. I am aware o...
Vaporization asked 7/6, 2012 at 23:38

5

Solved

I'm trying to debug an issue myself. May post it later if I fail ;-) My logcat log states "android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 2" I would like to ...
Infrastructure asked 23/6, 2010 at 20:2

1

Solved

I'am using an SQLite database and I regularly get runtime errors I can't find the origin of. After a query, I use moveToFirst to point on the first record retrieved and this sometimes triggers an a...
Cotsen asked 19/1, 2014 at 15:57

3

Solved

I'm operating on an SQLite3 database in my android app. I just read from the pre populated database that has 200k rows and 14 columns. Entries are words. Datatype of all columns is text. Querying f...
Aglimmer asked 5/7, 2013 at 19:30

2

Solved

I'm making an application for android and I'm using CursorTreeAdapter as ExpandableListView. I want to use a search box for displaying the filtered ExpandableListView items. Like this: Here's the ...
Bedwarmer asked 14/12, 2013 at 15:56

4

Solved

I'm trying to get certain book data from my Inventory table based on the ISBN. However, I'm getting an error: "attempt to re-open an already-closed object". The error only occurs when I click a li...
Bankruptcy asked 11/1, 2014 at 3:44

4

Solved

I'm querying the CallLog content provider and need to detect the column types. In Honeycomb and newer (API Level 11+) you can get a columns preferred data type by calling the method Cursor.getType...
Goodbye asked 25/7, 2012 at 20:39

3

Solved

I'm implementing a ExpandableListView and for each group, it shows the childs, and each child with its own duration, and the group shows the sum of all the durations of the childs. However, when I...
Colonialism asked 22/7, 2012 at 20:5

4

Solved

As per the title, if we used to call cursor.requery(), but it is now deprecated. How do you call this function now? This method is deprecated. Don't use this. Just request a new cursor, so you can...
Hurter asked 23/8, 2011 at 6:22

5

Solved

Being new in Android, I am having trouble dealing with the following: public String[] getContacts(){ Cursor cursor = getReadableDatabase().rawQuery("SELECT name FROM contacts", null); String [] ...
Granulocyte asked 18/9, 2013 at 4:24

1

Solved

I'm trying to get the thumnail paths, not the bitmaps objects. When I query for these, some of the thumbnail paths are null for some reason. (I have 1028 thumbnail images in my device, the cursor l...
Subjectivism asked 11/8, 2013 at 12:49

© 2022 - 2024 — McMap. All rights reserved.