Just created a camera preview in Android with CameraX with the following configuration: Now, the problem is that such target resolution may not be available, in which case the preview will choose a resolution closed to the requested one. What I’m asking here is a way to know which resolution has effecti…
Tag: android
Unable to migrate android sqllite database
I have been running the onUpgrade method without issues, until this column: I have updated the database version. The above has been simplified to try and make sure that nothing else is causing this column to not be created. Note that if I uninstall the app and reinstall the app, then it runs without issue. Ho…
listFiles() returns null on /storage/emulated, while /storage/emulated/0 exists
I am testing on android 27 emulator and trying to traverse some directories. When I try to traverse /storage/emulated directory, the method listFiles() returns null while there /storage/emulated/0 exists. Here is a testing code: P.S. I have added the proper storage permission in manifest and granted the runti…
Unable to fetching subscription detail from Google Play Android Developer API
I am trying to use Google APIs Client Library for Java to get information about user’s subscriptions purchased in my android app. Then I got this error: I am trying those steps: Go to https://console.cloud.google.com Create a project (or select existing project) Create a service account with role Pub/Su…
Copy some values from one ArrayList to another kotlin
I have list: ComplexModel contains (Name,Title,StartDate,Summarry) I want to find better way to create new MutableList from skillsList but the new list have to get only Name and Title from the first.For the moment i`m with this solution but i wonder if there are better way to achieve this. Answer
android.support.constraint.ConstraintLayout class not found
After importing android native ads templates module from https://github.com/googleads/googleads-mobile-android-native-templates I cannot run the app because of the following error Caused by: java.lang.ClassNotFoundException: Didn’t find class “android.support.constraint.ConstraintLayout” on …
Firestore Paging Adapter- How to know if query returns 0 results
I’m using firestore paging adapter to populate my RecyclerView with data from Firestore, if collection in Firestore is empty I would like to show a TextView to inform user about that, if it is not then I would like to populate EecyclerView with data but I don’t see a way to do this with Firestore …
Android Java Upload File via WebView without FileChooser
I need to write an Android application which is capable of loading a Website via a WebView. The Website contains an Input (Type=FILE) When loading is done, the application should use a specific Image and upload it via a storage path: I already tried to open a FileChooser-Dialog and that works, but I need a so…
java.lang.NoClassDefFoundError on Android 4.2.2 Devices
I have an Android application and need to implement bluetooth low energy functionality. The BLE features should run on devices with Android API Level > 26 (Android 8), but the app should also start on devices with Android > 17 (Android 4.2). I have tested this app on Android 8 and 4.4 and there are no p…
Error with react-native run-android after upgrade to react-native version 0.60.4
I am upgrading react-native from 0.59.5 to 0.60.4 with my existing application. But facing a problem as below And my build.gradle is I have absolutely no clue what this error is about and could not find much helpful articles. Please help me out. Answer Looks like Gradle is currently erroring on builds using o…