I always get these errors while building my Cordova project and i tried updating everything in SDK manager and acceppting all licenses but i still get these error’s. how can I fix this? Answer as the outpus sais, the Build Tools revision 31.0.0 is apparently corrupted. All you need to do is: Open Androi…
Tag: android
Dao Room database. How to SUM all the amounts and view it as a TextView?
I am creating a simple expence tracker. I can add items to the database and view them in a recyclerview. But when I try to SUM all values from a column, it only return 0 instead of the sum of all the values. First of all, here’s the column which values I am trying to sum together. And here is
How to access array data from Firebase Firestore?
I have a Firebase Firestore database that looks like this: And I want to store that data in my ArrayList<> If You are not understanding anything you can check my previous question Question Link StackOverFlow Answer To display the of your favFoods array, please use the following lines of code: So as you …
Android Studio fragment becomes invisible by clicking on menu item
I’m working on a nutrition app. In this app at the bottom there is a menu with the menu items “Start”, “Gerichte” (Meals) and “Info”. When you click on the menu item “Gerichte” it opens a fragment which contains a menu at the top with the menu items “…
How to auto refresh data in android studio every second?
I am new to android studio, I am making an app that gets the json of a field in thingspeak, but I don’t know how can I make an auto refresh to the data I get every second. Can you please help me? Answer I found a solution finally, I placed the data request inside the following code and it
“Value <br of type java.lang.String cannot be converted to JSONObject" – Android Studio
So I am using Android Studio (Java), and I have to communicate with a website that I made using Apache (xampp). I put in a json object 3 variables. Two of them are strings and the other is a signature I made using the code on the website – https://developer.android.com/training/articles/keystore. The er…
CameraX: Animated Zoom
I am developing a camera app and I want to have something like double tap to zoom. I was able to implement that, but later I wanted to improve the app’s UX by animating the zoom. I tried applying a Ticker logic to do that but performing a simple zoom call from the CameraX API takes its own time (high
How can i save the date and time of a task using shared preferences?
I am trying to store the time at which a BLE scanner successfully scans for broadcasted advertisement packets. So far i am using the Function which successfully allows me to print the time of scans. I am also using SharedPreferences() to store the information recieved from the scanned data such as RSSI and he…
Camera VIew OpenCV in Android Cannot FIt
I have a problem with cameraview opencv on android, on android device type samsung camera view doesn’t fit there is a black cut like picture 1 while on android device type xiaomi and realme it’s safe like picture 2. I took the middle resolution from supportPreviewSize and set the maxFrameSize to a…
Strange layout rendering created with xml in andoid
I want to arrange buttons evenly on the layout using styles to make my code simple. So why buttons have different distance between each other and ViewGroup? Am I right that attributes defined in the xml file overrides style’s attributes? // xml code for the activity // used style Answer What the three b…