Category "android"

Moshi: How to provide adapter for PolymorphicJsonAdapterFactory.withFallbackJsonAdapter while configuring Moshi.Builder

I'm trying to use PolymorphicJsonAdapterFactory for JSON which provides different structure depending on type field, like below. { "notifications": [ {

how to launch AR apps on emulator?

I'm developing an AR app using unity but I don't have an android mobile so I decided to work on an emulator and I read all documentation about it but it didn't

HAXM Installation failure in android studio

I am trying to download HAXM to run devices on Android Studio but I keep getting a failure message and none of the suggestions from similar questions is working

How to observe ContentProvider changes for coroutine flow

I have a flow to fetch data from database via content provider. fun getDataFlow(): Flow<Result> { return flow { emit(Result.Loading) // f

It is safe to request dao flow from UI thread

If we declare a db operation with @Query("..") fun itemList(): List<Item>, we must make sure that the code runs on a background thread. If we declare it a

Location service status couldn't be determined when try to retrieve location data via a backgroud service

everyone, I'm trying to get the location data every time the application run a script via a background service for same reasons, but I got every time Location

image_picker maxDuration not limiting videos in gallery selection (Android or iOS) - Flutter

Utilizing image_picker: ^0.7.5+3 Using iPhone 12, iOS 14, Android Google Pixel, Android 10. Code: var pickerFile = await ImagePicker().getVideo(source: source,

Flutter Plugin: crash_dump.cpp: failed to attach to thread 185: Permission denied

I am developing a Flutter Plugin and a simple piano keyboard layout which calls the Flutter plugin when onKeyPressed and onKeyUp the piano keys. The piano app c

How to get notifications click/open updates in RNFirebase

I am using RNfirebase to push notifications to my React native application. When the app is in background I am trying to send a notifications which is working f

Unable to build the android application with buildozer and kivy

This is my last hope of getting the fixed for the buildozer python issue. I already raised an issue in github for kivy. But there was no valid answer for it. I'

Custom view in layout doesn't show while using "match_parent"

I have a constraint layout that consists of two TextViews and a custom BoxBackgroundView. I want the box background to scale in size with the text, but when I u

Sources for android API 32 platform not found

It says sources for android API 32 platform not found and when I try to download it say all packages are not available for download how can I solve this pro

How to update a JSON array in a Java

I have a JSON file name abc.json Once I opened this file there is data like in square brackets. [{ "1" : "xxx", "20" : "ppp", "25" : "hhh" }] Here in this keys

Which android lifecycle methods are guaranteed to be called after a call to finish()?

I have an activity A with several execution branches that end with a call to finish(). Reading the documentation, my understanding is that this will result in

How to make item selectable in recycler view and use it?

I have followed android developer documents to create the recycler view. But now I would like to make the item selectable. Currently have created itemAdapter.kt

Using an annotation to Serialize Null in Moshi with nested Event

I am attempting to add a custom annotation to serialize specific values in my model to null when calling the toJSON method from Moshi. I have something working

Get contacts which have same phone number stored in phone number list in firestore

this is my first time trying Firestore. I have a collection named users, where every user is a UID and every user has fields (name, phone, and contacts (array))

Android Studio stuck at launcher after latest patch update

Android Studio is stuck at launcher after latest patch update. I got the patch update on latest Bumblebee and it is now stuck at the launcher only. Attached scr

The method '[]' can't be unconditionally invoked because the receiver can be 'null' what is the problem

I want to show the staff list in the Firebase database. However, I am getting the following error. import 'package:firebase_database/firebase_database.dart'; c

FirestorePagingAdapter crashes when scrolling in version 8.0.1

After updating FirebaseUi from implementation 'com.firebaseui:firebase-ui-firestore:8.0.0' to implementation 'com.firebaseui:firebase-ui-firestore:8.0.1' Firest