Questions tagged [android-database]

General programmatic usage of databases on Android

Databases and tools related with persistence supported by the Android operating system.

584 questions
1
vote
1 answer

Android with Kotlin best ways to storage a custom class

this is the first time that I need to store some data permanently so I would like some suggestions before to proceed. I've read that there are different ways to store data on an Android device: Internal storage Shared Preference (but if I've…
patana93
  • 73
  • 1
  • 8
1
vote
0 answers

SQLite selection failed with Python Script

I am using python script running for some calculations and saving the results to SQLite database. Python operation takes time to process, so i put that part in an asyncTask. And database insertion is written inside the onPostExecute() method. Data…
1
vote
0 answers

SQLite Database insertion not working from AsyncTask

I have done some background activities inside an asynctask class on my Application. And the result from this is saving into SQLite DB. But db insertion is not happening and never showing any error on console. Please see below code and let me know if…
1
vote
0 answers

Android ROOM - Updating table column rows

I have an entity in my ROOM database. child_exercises_table which is populated in PopulateDbAsyncTask. @PrimaryKey int childExercises_id; private String child_exercise_name; @Nullable private String vid_file_path;` This entity has 3 field:…
Josh Brett
  • 77
  • 3
  • 18
1
vote
0 answers

Is android sqlite database synchronized with read and write operation?

I have a singleton SQLiteOpenHelper object which I will be using all over the application. I tried performing read and write tasks in parallel from different threads with singleton database helper object but I didn't see any DataBaseLockException or…
Stack
  • 1,164
  • 1
  • 13
  • 26
1
vote
0 answers

CursorIndexOutOfBoundsException when calling a valid index

First I wanted to check the password entered is specific to that person but when I wrote the code like this: Cursor cursor = db.rawQuery("Select * from user where email=?", new String[] {email}); String num = cursor.getString(1); the password is in…
1
vote
2 answers

Ways of transferring data between 2 apps?

I am developing an app which by design should accept request from other apps(with some authentication token) and should be able to send requested data(media file or address of media file in local storage). I am not able to do it without switching…
Lokendra Choudhary
  • 469
  • 1
  • 6
  • 20
1
vote
1 answer

How unique are document id of Firestore? Considering more than million document

I am trying to get the auto-generated ID from the DocumentReference Object DocumentReference docref = db.collection("users").document(); String ID = check.getID(); The question is since the ID's are generated at client side there can be chances…
1
vote
1 answer

Android 11 | Scoped storage enforcement

As per the Documentation Use scoped storage unless your app needs access to a file that's stored outside of an app-specific directory and outside of a directory that the MediaStore APIs can access. If you store app-specific files on external…
Hey You
  • 303
  • 3
  • 16
1
vote
1 answer

move one row from listview in Activity to another listview in another activity

i have two listviews each one of them is in different activity i want when i long click on any row from the first listview get moved the second listview and still do the same task as if it was in the first one(for example open an activity) and the…
1
vote
1 answer

send a row from a listview saved in database sqlite to another listview and make it do the same as the row in the first listview

i have two activities each one of them have a listview the first one is connected to a data base and get its data from strings.xml i want to send a row to the other listview in the aother activity and make it do the same as if it was in the first…
1
vote
2 answers

How to execute a trigger multiple times in SQLite android?

I am developing an android application that has implementation of SQLite database, i want to create a trigger that runs a number of times utill specificcount is reached. What is required There are 2 tables TABLE 1 and TABLE 2 After insert on TABLE…
User
  • 692
  • 2
  • 11
  • 29
1
vote
0 answers

SQLiteConnection, database was leaked, after fast trigger update

My error log : 2019-11-28 11:46:59.415 13936-13936/com.example.thongapps E/SQLiteLog: (14) cannot open file at line 35803 of [605907e73a] 2019-11-28 11:46:59.415 13936-13936/com.example.thongapps E/SQLiteLog: (14) os_unix.c:35803: (24)…
Budi Mulyo
  • 384
  • 5
  • 22
1
vote
1 answer

Getting following exception for android room database java.lang.IllegalArgumentException: @androidx.room.Database does not define an element views()

I am getting following exception for android room database java.lang.IllegalArgumentException: @androidx.room.Database does not define an element views() I tried to search for any solution on SO but was not able to find any. Can anyone explain…
Ameya721
  • 171
  • 1
  • 9
1
vote
1 answer

Room Database fails to prepopulate the data and Database files are not Created

I have implemented the Room database in Application. I want to prepopulate the data when app is first opened. The Entity class looks like @Entity(tableName = NameConstants.TABLE_NAME) public class Name { public int getId() { return…
Satyam Gondhale
  • 1,415
  • 1
  • 16
  • 43