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 run the app, it throws the following exception. Can someone please help me figure out what am I doi…
Tag: android
Sentry android ANR, could there be a false alarm?
I’m using Sentry-Android 2.3.0 SDK to collect android crashes and ANR, for the past few months, there were a couple of weird ANRs showing up. All of them happened when the user turned on the device after some time, all of them happened in the MessageQueue.next method. After digging in the Sentry SDK sou…
Android Cloud Firestore document fields query
How to query all timestamps for a certain date (20210205) and certain user (ala) from Cloud Firestore in the below example? For now, I can download the entire document and filter it on the device. But it’s not effective. Answer You can filter for FieldPath.documentId() as shown here to get the ala docum…
App not compatible on playstore due to android.webkit
I have published my webview app on playstore but after publishing playstore says it not compatible for everyone and when I asked them why is that so they told me that is because it doesn’t have android.webkit. Please let me know what have a missed the code seems fine to me and should be working. public …
Problem resolving an android.content.res.Resources error
I understand that this error has been addressed severally and I’ve checked most of them like Android: android.content.res.Resources$NotFoundException: String resource ID #0x5, android.content.res.Resources$NotFoundException: String resource ID to see if I could find a solution to my problem but I couldn…
Retrieving image from SQLite Database (BLOB data type)
I have tried to retrieve the byte[] from my SQLite DB using the code: Error returned: Answer Your query: returns only 1 column and since the column indices in a cursor are 0 based, you should retrieve it with: Also, you should use moveToFirst() to check if the cursor returned any rows before retrieving the co…
How to load image in Picasso correctly
**Hi, i’m trying load images from url like this: link As you can see, the images have different sizes. For example, the first image is 1920×1280 in size. The second image is 720×11523 in size and the last image is 720×5420 in size. But, this in my application looks like this: In this link…
What is the difference between get() and addListenerForSingleValueEvent?
I see a lot of tutorials, documentation and questions about using the Firebase Realtime Database on Android talk about the addListenerForSingleValueEvent method. This method reads the value from the database once, which is what I want to do. But in the auto-complete in my IDE and in the documentation I also s…
Why counter just increase to 1 in firebase?
im trying to increase a visitor counter views when access to read a message, so i made a method called incrementar () and set it where i retrieve info when someone click to open that post. But i dont know why only increase to 1 view in firebase, if i click again it does not increase. should use shared prefere…
Room Database. Insert sucessfull but no data found
I’ve got a simple Room database setup as seen below: Entity Class My Dao Interface: My Database: Finally my ViewModel: And my Activity where I print the results: As you can see from the code, I first try creating a default user in my database. If the insert is sucessfull, which it is cause I always ente…