android-cursor Questions
1
I am getting an error in Android Studio to do with my Cursor.
I have the following line in my code
val dataText = cursor.getString(cursor.getColumnIndex(MyDbNameClass.COLUMN_NAME_TITLE))
I tried u...
Foreground asked 3/3, 2022 at 13:29
6
Solved
I am populating a spinner from the database like this
// Populating the City Spinner
Cursor cities = db.cityList();
startManagingCursor(cities);
// create an array to specify which fields we ...
Men asked 28/4, 2011 at 12:48
3
Solved
I am getting an error in Android Studio to do with my Cursor.
I have the following line in my code
String data = cursor.getString(cursor.getColumnIndex(columnIndex));
columnIndex is being passed i...
Court asked 4/9, 2021 at 6:55
3
Solved
I am developing an application which download some files and save their text in file_content field to database. The file sizes can vary from some KBs to 10 MB. The app works for all sizes while sav...
Miculek asked 29/1, 2014 at 13:29
5
Solved
I'm searching for a way to prevent the user from moving the cursor position anywhere. The cursor should always stay at the end of the current EditText value. In addition to that the user should not...
Crore asked 23/6, 2012 at 14:46
3
Solved
I have read just about everything there is to find here on this issue, not getting past this.
I have a simple app starting with the MainActivity, my Content Provider is correctly defined in Android...
Heyman asked 27/8, 2013 at 11:10
0
Background:
I have an orders table in my database whose data I show in RecyclerView. I do it by using a CursorAdapter in RecyclerView.Adapter. All of this is done in parent activity.
Besides this I...
Polychaete asked 5/8, 2020 at 18:47
1
Solved
It is possible to import a text file of 6MB directly into my database. However, the text can't be extracted since CursorWindow has a limit of 2MB. (I should have used files, but some users already ...
Haff asked 15/12, 2019 at 22:55
4
Solved
While working with SQLiteCursor in Android I came to know that the getColumnIndex() is behaving case sensitive for example:
Example:
Column Name in DB was: Rules
cursor.getColumnIndex("Rules&q...
Annual asked 27/1, 2012 at 6:19
7
Solved
I have this database using sqlite, and I'm having problem with closing the cursor its saying that Application did not close the cursor or database object that was opened here here's the logcat
10-...
Hora asked 18/10, 2012 at 8:54
2
Solved
I am trying to convert a query which returns a single row with multiple columns to multiple rows with one or multiple columns. As an example my query looks like the following visualized:
SELECT _i...
Lardon asked 14/3, 2017 at 7:58
2
Does anyone understand how to use SQLiteDatabase.CursorFactory on Android? I am looking to obtain a persistent SQLiteCursor object which uses an SQL SELECT statement where several of it's WHERE cla...
Europium asked 9/7, 2012 at 9:36
5
I am trying to get column value from a cursor, this column is generated at run time by calculations inside the query, I am getting a null value of this column, I am able to get a value of all other...
Kostman asked 23/2, 2012 at 11:21
10
Solved
I frequently see code which involves iterating over the result of a database query, doing something with each row, and then moving on to the next row. Typical examples are as follows.
Cursor curs...
Prostitution asked 23/5, 2012 at 16:3
1
Solved
How to correctly close cursor in Kotlin after use. I know how to do it in Java but doesn't matter what I do in Kotlin, it still gives warning to close it.
I tried:
val cursor = context!!.getCont...
Duplex asked 1/2, 2019 at 23:27
7
Solved
When I'm trying to get the phone numbers from the contact list of the phone. The problem is, when I'm running the app while the contact list in the phone is empty, the app is stopped. I check...
Pennant asked 21/2, 2013 at 19:37
5
Solved
How can I create a list Array (the list display First Alphabet when scroll) with the cursor data?
Estimative asked 30/8, 2009 at 14:31
1
Solved
I can select all contacts using the query below
cr = mActivity.getContentResolver();
String selection = ContactsContract.Contacts.HAS_PHONE_NUMBER + " > 0";
String orderBy = ContactsContract...
Absenteeism asked 28/4, 2018 at 13:53
4
In my app I work with ContentProvider and use LoaderManager.LoaderCallbacks<Cursor>.
Fragment (View)
public class ArticleCatalogFragment extends BaseFragment
implements ArticleCatalogPrese...
Anatase asked 11/8, 2015 at 20:40
2
Solved
I have an adapter class which is extending GroupingCursorAdapter and constructor of type
Adapter_Contacts(Context context, Cursor cursor, AsyncContactImageLoader asyncContactImageLoader).
I want ...
Index asked 27/12, 2013 at 8:24
5
I have strange problem with android database and cursors. Time to time (very rarely) happens, that I got crash report from customers. It's hard to find out why it crashes, as I have ~ 150 000 activ...
Bedrock asked 30/4, 2014 at 11:54
3
Solved
I created a service which syncs data from the web on a background thread and want to notify a list activity when the service has completed so it can update it's cursor? What would be the best way t...
Heptachord asked 6/7, 2011 at 6:1
6
Solved
My code is as below:
String[] columns = {ContactsContract.Contacts._ID, ContactsContract.Contacts.DISPLAY_NAME, ContactsContract.Contacts.HAS_PHONE_NUMBER};
Cursor cursor = getContentResolver().qu...
Haemostat asked 27/6, 2012 at 3:5
3
Solved
I'm using an AutoCompleteTextView to suggest user some words from my sqlite db as they type the input string to search.
I try to make the suggestion look friendly by using simple_list_item_2, here...
Banerjee asked 21/3, 2011 at 11:15
4
Solved
While learning to iterate over a cursor, I learned that I needed to first move to position "-1" and then use "moveToNext" in a loop:
cursor.moveToPosition(-1);
for (int i = 0; cursor.moveToNext()...
Detestable asked 17/12, 2014 at 16:23
1 Next >
© 2022 - 2024 — McMap. All rights reserved.