Category "android"

How to use different menu in fragment than in activity?

I want to have a menu for my main activity and a menu for a fragment which is contained in the main activity. The main activity menu should be removed and the f

Privacy policy link for Google Play

I am having trouble here, this is my first app and there is so much involved, I did not think it was this hard, currently I am stuck on adding a link to my app'

EditText not automatically saved on screen orientation change

I read that Android automatically saves the content of EditText objects when an application is about to be stopped or killed. However, in my app the content of

Emulators can't load "libGLES_emulation" driver

I am in the process of setting up FirebaseUI using Google's guide but I suddenly got an error I can't seem to find a solution for. I'm pretty sure it has to do

How to get the key from the value in firebase

How do I get the key "-KLpcURDV68BcbAvlPFy" when I know the field "name" contains "efg" in the following structure in Firebase. clubs -KLpcURDV68BcbAvlPFy

how we can display pound and euro symbol in android TextView?

How do I display pound(£) and euro(€) symbol in TextView? need help!

PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)

I've searched the whole internet, tried every possible solution, still I'm not being able to sign in using GoogleSignIn from my flutter app. Things I've tried

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