Category "android"

Android activity onKeyDown() not triggered for Power button, and Intent.ACTION_SCREEN_OFF is not broadcasted either

I have an Activity (Activity_RingAlarm) that is supposed to be launched as a full-screen intent when an alarm rings. The activity is launched fine, no issue the

How to animate content replacement in Android Bottom Sheet

I have a BottomSheetDialogFragment which contains two different layouts <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_pa

Android & Firestore - deducting value from an object

General context: The app I'm making manages activities with resources at hand. Once users create cases, the amount of materials each case needs is deducted from

AWS recognition SDK causes the gradle to not build in Android Studio

I tried manually adding the "aws-java-sdk-1.12.199.jar" to the library and added the line "implementation files('libs\aws-java-sdk-1.12.199.jar')" into the grad

After click view not display on screen if I set visibility to VISIBLE - Android

I got a view and in xml it is visible <LinearLayout android:id="@+id/container" android:layout_width="match_parent" android:layout_height="wrap_c

Android: Check if my app is allowed to run background activities

I have an app that runs a stopwatch service, and I run the service in the foreground. I have a notification showing the timer, that updates each second. The not

Periodically query a database and Flow the result in Android

In Android I'd like to 'poll' i.e. send GET requests to a webserver every 10secs, write the data-received into a Room Database, and Flow the database-contents t

Flutter ffmpeg_kit_flutter: get FFmpegKit.executeAsync error

I have prepared a test program to run FFMPEG command and it successfully run -i "/data/user/0/com.example.test/cache/file_picker/test.mp4" -c:v mpeg4 "/data/use

How do I persist authentication state in my Kotlin firebase app?

I am building a kotlin app using FirebaseAuth and I want to add some custom rules to keep the user signed in for a time even if they are not using the app. All

java.lang.IllegalArgumentException: Invalid column: _data

while running this code I am getting invalid: column _data exception RingtoneManager.setActualDefaultRingtoneUri( context, Ring

Android UI broken when run

I am facing very strange problem, though I am beginner level on Android. after designed my layout file, when i run this android project by using physical device

Can you use old nav graphs with jetpack compose

I am migrating a fragment from old Jetpack to Jetpack Compose. This fragment is part of an existing nav graph. After migrating the fragment (using ComposeView)

Keycloak to Flutter Android App Redirect Issue : HTTP is working, HTTPS is giving error

I have implemented flutter_appauth and I am using Keycloak as Authentication Server. Code snippets are as follows: Main.dart final String _clientId = 'flutter-d

(Breaking Again) The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first. (Android)

I've been using facebook sdk for over a year now and i had followed the docs accordingly but since yesterday the app started throwing the error and it's also oc

this application requires the latest version of arcore but installed

I'm using AR for my app. when I want to use AR I got this message: this application requires the latest version of arcore but installed but it installed: de

Sending Data between Fragments using Shared Viewmodel and SharedFlow

I'm very new to Kotlin Flows. As the title suggests I basically have 2 Fragments that Shares a ViewModel. I want to send data between them using SharedFlow as a

Cannot get app name correctly in android API 30 or higher

I want to get a list of app names installed on android phone. However, when I run my code, I can't get some of the app names correctly as shown below. D/applica

error: incompatible types: ImageActivity cannot be converted to Context

I'm getting this incompatible type error for my code. The error shows in ImageActivity class. The error is in line: imageAdapter = new ImageAdapter(ImageActivit

Why `supportFragmentManager.backStackEntryCount` is empty after `add()` fragment to stack

In Android app (Kotlin) I have Activity with container what have fragment A in it. On user interaction, I am adding fragment B to container by: supportFragmentM

How to get a list of wi-fi networks

Good afternoon. For a very long time I have been trying to get a list of wi-fi networks using WifiManager. When I try to get through a virtual device, I get onl