Category "android"

Can I get the routing table entry in Android?

Is there any method for getting the routing table entry in Android? Please share the information..

Android tests BuildConfig field

Suppose my build.gradle file defines different values for the same variable that is defined in BuildConfig: android { def INTEGER= "integer" def VARIAB

Android: Color To Int conversion

I'm surprised that Paint class has no setColor(Color c) method. I want to do the following: public void setColor(Color color) { /* ... */ Paint p = new Paint();

Handling refresh tokens for FCM device groups

I am trying to implement Firebase cloud messaging in my Android app through a Node.js server and I have got stuck at a usecase. I saw the Firebase tutorial of

Android aar library does not include BR class

I develop a small library for testing aar library creation with databinding. My problem is when I generate the aar file it doesn't include the BR class generat

getActionBar() returns null

I'm having an odd problem. I am making an app with targetsdk 13. In my main activity's onCreate method i call getActionBar() to setup my actionbar. This works

Data Saver Mode - React Native

I build an app using react native v0.60. Receive a complain from user when they set their phone in Data Saver mode the app is cannot be used. The user need to e

AAssetManager_openDir takes long to execute

I have a problem with AAssetManager_openDir method taking long to return. It is not affecting all devices, it looks like it is quite fast on ART devices (only m

: Can't access the Fragment View's LifecycleOwner when getView() is null i.e., before onCreateView() or after onDestroyView()

I am using live data in my application for all the network calls and response handling. In one of the scenarios, my recycler view is loading some data in its v

How can I find if a particular package exists on my Android device?

How can I find whether a particular package or application, say: com.android.abc, exists on my Android device?

How to add a button with image and text dynamically in Android GridView?

I want to add ImageButtons with text dynamically to a GridView (Something like below) and also set a listener such that a user enter a different page, when he c

“java.lang.IllegalStateException: Activity has been destroyed” after resuming the FragmentActivity on Android

I am using this approach: Separate Back Stack for each tab in Android using Fragments I am trying to push fragment from first fragment, after resume the Fragm

Android Location/GPS questions

A couple of questions regarding Location which I have not found answers to: Location.getLatitude()/getLongitude() return a double. What units is this double exp

Is it possible to use Paging (As part of android jetpack) without using Room DB?

Right now I'm working on an Android project which contains a RecyclerView with a large amount of data. For improving the app's performance I wish to implement

How to load MainActivity.java from server?

I'm developing an app in which the code is in MainActivity.java (locally) but I would like know how can I load MainActivity.java externally? Example: Save the

Show RecyclerView/PopupWIndow by anchoring below or above edittext depending on where the cursor is and depending on screen available height

I am trying to display @ user mentions like facebook or twitter. I am able to implement this functionality. But i have a ui problem. If edittext is at the botto

RelativeLayout is taking fullscreen for wrap_content

Why does FOOBARZ get layed out all the way at the bottom when no elements are layout_height="fill_parent" in other words, all elements are wrap_content for heig

Show RecyclerView/PopupWIndow by anchoring below or above edittext depending on where the cursor is and depending on screen available height

I am trying to display @ user mentions like facebook or twitter. I am able to implement this functionality. But i have a ui problem. If edittext is at the botto

Camera Preview in Expo is Distorted

I'm using Camera that comes from expo package and I'm having trouble with camera preview distortion. The preview makes images appear wider in landscape view and

java.lang.SecurityException: Requires ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permission

I am developing an android where I want to get user location using NETWORK_PROVIDER,I am not using GPS for this purpose.I am getting following exception java.l