Android: Should I use local Storage or SQLite (or similar)?

I am just starting to learn Android Development. I have to develop something similar to a Log APP where the user can save information.This is student project, so I don’t have to use Users/Passwords, …

Room database not created

I’m trying to develop an app with Room. The project is in java. This is my first time using Room. I’ve followed the documentation and created class with @Database, @Dao & @Entity. However when I …

Retrieving image from SQLite Database (BLOB data type)

I have tried to retrieve the byte[] from my SQLite DB using the code: public byte[] getImageData() throws SQLException{ SQLiteDatabase db = this.getReadableDatabase(); Cursor cursor = db….

Room Database. Insert sucessfull but no data found

I’ve got a simple Room database setup as seen below: Entity Class @Entity public class User { @PrimaryKey public int uid; @ColumnInfo(name = “first_name”) public String firstName; @…

i cant update value in SQLite

I have this table to sqlite: public static final String TABLA_PARA_SEGUIR = “CREATE TABLE ” + TABLA_SEGUIR + “(” + ID_ELEMENTO + ” INTEGER PRIMARY KEY …

android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed Couldnot figure out what the error says

I have got stuck in the above-mentioned error message in Android Studio. My Database is a simple one 1st column: Name TEXT PRIMARY KEY 2nd column: Price TEXT I have already gone through the answers to …

org.json.simple.JSONArray cannot be cast to class org.json.simple.JSONObject

I keep getting this error and already searched a lot and cant seem to solve it. Basically i am trying to read a json file and store some of its data in a database. Hope you guys know how to solve this!…

SQLite does not update the date value

I am trying to update the date value in the database which is hold as a text, however I stucked here, it takes the user correctly, but does not update the current date; public int getID(String …

Populate single TextView with multiple SQL columns using SimpleCursorAdapter (Suggestion for searchbox)

I’m using SQL as datasource. My app’s searchbox has autosuggestion, but currently it’s only able to return the results of 1 column (e.g. column1). I want it to be able to search in 2 columns (so, …

Why don’t my data insert into SQLite database on android?

I’m creating a simple todo list. So, I have activity (NewTaskActivity) Xml code: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/…