Category "android"

Get Human readable time from nanoseconds

I am trying to implement an ETA feature Using System.nanoTime() startTime = System.nanoTime() Long elapsedTime = System.nanoTime() - startTime; Long allTimeFor

HTML5 datalist in Android Chrome

I have an HTML5 datalist working in Chrome (desktop) but when using the same input in Android and the latest Chrome, auto-completion no longer works. Is this f

How to get info of currently playing music using broadcastreceiver while the app isn't running?

I would like to receive broadcasts from music players while the app is in the background. I found the following code here: @Override public void onCreate(Bund

how to generate AndroidManifest.xml from a react-native app created with react-native init

I used react-native init to create my react application. I'm trying to tie in auth0 and auth0 documentation is saying I need something from the androidManafest.

Flutter - How to decrypt a RSA private key encrypted string if we have RSA public key with us?

Flutter app receives public key in the form of contents of public.pem file which would be a string like "-----BEGIN PUBLIC KEY----- MIICqq7DBi9sBXZfDYJC+G57JYUC

What's the difference between .kt and .kts files in Kotlin. When should we use .kts file over .kt file?

What is the purpose of using .kts files in Kotlin? Are these files included in the app bundle when releasing the app?

Connecting to a USB Android device in a Docker container via ADB

I have created a Docker image which contains the Android SDK and am trying to expose my Android phone in a container running this image. So I used the --privile

Is there any difference, if I init AES cipher, with and without IvParameterSpec

I was wondering, is there any difference, if I init AES cipher, with and without IvParameterSpec? With IvParameterSpec SecretKeySpec skeySpec = new SecretKeyS

Automatically scroll to bottom of RecyclerView

I have a fragment that has a RecyclerView inside its layout file. The RecyclerView holds messages in a chat. So naturally, I need the RecyclerView to scroll to

Xamarin forms : Stop page being accessible from hardware back button

I am using xamarin forms prism. Quick info : I have a page that contains information, this page the user can delete along with its information, this page is an

Android Data Binding: How to avoid "cannot find the KaptTask" warning

I have a large Android project with multiple library modules. They all use Kotlin, and many have data binding enabled. The project and all modules build and run

How to emulate TrustZone in QEMU?

I'm trying to emulate TrustZone features in Qemu. I've found two links that seems explain this process. The First Reference doesn't attach the image kernel tha

java.lang.VerifyError: Verifier rejected class [0x25] tried to get class from non-reference register v12 (type=Imprecise Constant: 127)

crash after remove "-dontshrink" in proguard-rules.pro log: java.lang.VerifyError: Verifier rejected class com.xxx.activity.XXActivity: androidx.loader.content.

Android Studio gradle takes too long to build

My Android Studio project used to build faster but now it takes a long time to build. Any ideas what could be causing the delays? I have tried https://stackover

Responsive Design: Everything shrinks when mobile keyboard is active

There are many screen resolutions in browsers nowadays, so using px in my CSS sizes isn't actually a good idea. I adopted and used vh in substitution for px sin

Android method performance suddnely slow after upgrade from Marshmallow to Nougat

I have been developing a game, using a Samsung Galaxy S6 running Marshmallow as one of my development devices. After the phone upgraded itself to Nougat, a met

Convert indefinitely running Runnable from java to kotlin

I have some code like this in java that monitors a certain file: private Handler mHandler = new Handler(); private final Runnable monitor = new Runnable() {

Android Studio is giving errors and warnings after enabling view binding. How to fix?

I am getting errors after i enabled view binding in my project. I have tried resyncing the project, invalidating cache. My app gradle file: apply plugin: 'com

Android method performance suddnely slow after upgrade from Marshmallow to Nougat

I have been developing a game, using a Samsung Galaxy S6 running Marshmallow as one of my development devices. After the phone upgraded itself to Nougat, a met

How can I use the singleton pattern in an Android project? [closed]

I know about singleton, but I can't use it in an Android project. I am a beginner in Android. How and where can we use singleton in an Android