I’m using Room on Android to query a POJO. My POJO (Transaction) contains a value and an account_id. It further contains an account (instance of Account), which is fetched by a @Relation. The …
Tag: android
How to access database on Android app without root
I’m developing a small app with a database of 100 elements. I import the database but only in one emulator (of 3 witch I have) runs correctly. I found that it runs without problems because the “Songs….
List DataModel reads just the last element
I have a database created with location updates and in the database there is a bunch of locations x and y. and in the second method readFirestore() reads the location data and compares the favorite …
How to insert multiple rows in a SQL Database
I’m developing a Recipes Book and I’ve a problem saving multiple Ingredients for the same Recipe in the database. I can add, pressing a button, multiples Linear Layout with inside an ingredient …
android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed:
Error FATAL EXCEPTION: main Process: com.appmaster.akash.messageplus, PID: 14373 …
Android Room Persistence Library – How to find entities with ids contained in list of ids?
I am trying to do the following query in my DAO. @Query(“SELECT * FROM objects WHERE obj_id IN :ids”) List queryObjects(List ids); It gives me this compile-time …
how to serialize an object into and save it to mysql database? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago. Improve this question i want to store a list of timestamps in android sqlite database. like : Answer Yes – simply text type column can be used to
SQLite not selecting date
My SQlite database in my app stores the date in the format of yyyy-MM-dd HH:mm:ss. I want to query a transaction that happened on a certain month of a year but my code is not working : Answer After some research I discovered that for some reason I had to do some casting for it to work.
Upload image to server and store path with text values into MySQL
I am still a beginner of Andorid programming and would need some help to the following: What I currently have are 2 codes, which the first uploads an image to the server and stores the path into a …
sqlite insert into table select * from
I need to move data from one table to another in my Android app I would like to use the following sql: Unfortunately in table MYTABLE2 there is an _ID column AUTOINCREMENT. What could I do? Thanks. EDIT: this is my MYTABLE2 the, the table I would like to populate with data from another table: Answer explicitly specify the column