Category "android"

Set Locale programmatically

My app supports 3 (soon 4) languages. Since several locales are quite similar I'd like to give the user the option to change locale in my application, for insta

How to reset the password of the lock screen programmatically on Android SDK 26 or higher

In my application I want to change the password of the lock screen programmatically. So I wrote this method to reset the password: @TargetApi(26) private void

Swipe gesture is very slow,...how to speed up my Swipe Gesture in android?

I have horizontal swipe gesture for my Appium test but when it is executed to the swipe gesture is very slow. Is there any posible way to do it? Suggestion will

How to create Drawable from resource

I have an image res/drawable/test.png (R.drawable.test). I want to pass this image to a function which accepts Drawable, e.g. mButton.setCompoundDrawables(). S

Android Studio and apksigner won't sign app with v1 signature

I have an app with minSdkVersion = 24 but when I use Android Studio signing dialog, the apk never gets signed by v1 (the store I use enforces to include v1 sign

How to set the Usb connection mode?

I'm writing an application which is supposed to dump data on the SD card and then another application on a pc which should read the data when the device is conn

Control the playback speed of video in android

I am using a VideoView to play a video file kept in res/raw. I couldnt find a way to control the playback speed of the video. Basically i want to reduce and inc

FCM notification not retrieve when app is closed

I am retrieving the notification from firebase cloud messaging into my android app. but the problem is when my app is opened or in running state in that case on

what is ems and why the editfield size is same (width)?

I just started android development, so I have two question in my mind First, why the size of edit field does not change its width. Secondly, what is the meani

How to Clear all apps cache data in Android Marshmallow

I know this question has been asked so many times, as I read all the answers but none gave me the complete solution. If Android 6+ is not allowing to clear all

Looking for ideas for Multipart Form Handling on Web Service

I'm playing around with writing a web service that runs on Android that handles uploading photos. I am only writing the server, and do not have any control ove

Check if application is installed - Android

I'm trying to install apps from Google Play. I can understand that on opening the Google Play store URL, it opens the Google Play and when I press the back butt

Navigation Component: IllegalStateException Fragment not associated with a fragment manager

I'm using the Navigation Component version 2.1.0-rc01 and I navigate back and forth between 3 screens using Navigation.findNavController(it).navigate(R.id.act

How to get link speed programmatically?

I am working on an app and it is almost finished except only one thing: I don't know how to get link speed and place it in the status bar.I am new to Java so if

Phonegap Android permissions, config.xml and plugins

I have a Phonegap app that I'm currently developing and testing for Android. Problem is, when I publish to device, the Android Manifest is full of permission re

How to resolve the duplicate column name error in Room Db migration

I added the below code for adding a column to the SithluBody table when migration. static final Migration MIGRATION_3_4 = new Migration(3, 4) { @Override

Android app link not working in android 12 always opening in browser

I have hosted assetlinks file into our domain https://ourdomain/.well-known/assetlinks.json And also verified this using https://developers.google.com/digital-a

How to prevent a splash screen image from stretching

I am creating a game. At the moment, for my splash screen, I use an image. The problem is it stretches. How do I prevent that? android:layout_width="match_p

Android: How to open Call Log (missed-outgoing-incoming call view)?

I am able to open the Call Log through the following lines: Intent showCallLog = new Intent(); showCallLog.setAction(Intent.ACTION_VIEW); showC

Android: How to remove margin/padding in Preference Screen

I am facing very weird problem in designing preference screen. Though I am not giving any margin in layout,it is leaving some space in left. As you can see in