How to check if a service is running on Android?

How do I check if a background service is running? I want an Android activity that toggles the state of the service -- it lets me turn it on if it is off and off if it is on.

Is there a unique Android device ID?

Do Android devices have a unique ID, and if so, what is a simple way to access it using Java?

Exporting and importing Vcard

I want to allow users to import their contact(email) into my php application. I am considering vcard format as most mobile phones allow vcard export. Now i have a few doubt Do iphone, android,...

How to send scheduled mail automatically from our android application?

I'm developing an application that sends mail to the entered recipient mail at the set time. The sender and the receiver are set static values. The application that sends mail from on set time to...

How can I run Linux commands on an Android device?

On some Android devices, in the ADB shell, I can only run echo, cd, ls. When I run: tar -cvf //mnt/sdcard/BackUp1669/apk/test.tar /mnt/sdcard/test.apk Or the command cp, it returns: sh: tar: not...

How to draw line on an osm map

I have an OSM Map and I have got updated latitude and longitude as I am moving on the way, after every 10 seconds. I want to draw a route line on the map as the user moves away. i.e. I want to...

PhoneGap Android app not displaying pdf data

I have a PhoneGap app for Android which I am trying to run in the Android emulator. The app has a simple html page which has a button. On click, the button calls a RESTful webservice using...

How to avoid multiple button click at same time in android?

I'm using two button in view. While clicking two button simultaneously it will goes to different activity at a time. How to avoid this? I have tried like this, But its not working please...

How to programmatically set the width of the LinearLayout?

Is the source of the slider and the lesson link: http://www.oodlestechnologies.com/blogs/Facebook-Style-Slide-Menu-In-Android In this case, the width of the file "left_menu.xml" determined...

PCM to WAV conversion in android

I have recorded a sound using AudioRecord class . But its not playable via music player. So I have added some header information to the audio file. Though its now playable via music player but its...

AppCompatDrawableManager.get() vs VectorDrawableCompat.create()

I am using support lib version 24.2.1, and have enabled support vectors with AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); What is the difference in these functions regarding...

Recyclerview smooth scrolling error

I'm trying to smoothscroll to a position in recyclerview using linear layout manager. void smoothScrollToPosition(int position) However, it doesn't work correctly always. Sometimes, it takes me to...

Unable to debug app on android for Mi Note 4

I have been trying to attach my Xiomi Note 4 which has android marshmellow, MIUI 8.2. I have turned on USB debegginng option on my device but then too I am not able to debug application on my...

Where is "~/.gradle" folder in Windows?

I was following the React Native document to create a signed APK. Source Setting up Gradle variables Place the my-release-key.keystore file under the android/app directory in your project...

Is there a way to download an MMS from command line using curl or wget?

I'm doing some Android malware research for MMS based attacks. And I'm looking for a manual way to retrieve or download a received MMS message. I was hoping to find some curl or wget lines to be...

Programmatically change height in constraint layout?

I have a simple layout: a fixed height TextView with three ImageView objects anchored to the bottom of the view. How can I programmatically change the height of each of the ImageViews so they...

Navigation Component: Cannot find NavController

I am using Navigation Component for navigating in my app. It works fine inside fragments but it fails to find the nav host in the activity that holds the actual navigation host. I am trying to...

Koin NullPointerException when trying to test ViewModel injection in a Kotlin Android App

I'm trying to test that a ViewModel has successfully had a repository injected into it, in a test. However, I get a NPE. The code works fine for the actual app, just not the test. I think it's not...

Which HTML tags are supported by the Android HTML class and how do I use HtmlCompat?

I am looking for a concise description of the HTML tags and properties supported by the Android Html class, specifically those tags processed by Html#fromHtml(). The official documentation states...

How to change refresh rate by adb command

I got information about device resolution, refresh rate and other info by adb command - adb shell dumpsys display After entering above command info retrieved is - mDisplayInfos= ...

Unable to run Intel HAXM installer: Cannot start process, the working directory does not exist

How to resolve this error which I am getting while installing HAXM installer. Unable to run Intel HAXM installer: Cannot start process, the working...

Flutter AzureDevOps Setup

I am a new flutter developer. I would like to find out whether I am able to use Azure DevOps with FLutter? How do I set it up, so I am able to build and deploy for both IOS and Andriod? I do not...

CameraX beta03 and bottom sheet scroll issue

I was upgrading cameraX alpha to 1.0.0-beta03 in my project. I am following this. Everything is working and I am able to take an image as expected. But I have a bottom sheet in the camera...

Glide unable to load url images of this type

I have used Glide many, many times before, but currently I am having issues to display images with this type of url...

Android Q /system/bin/ip no longer executable

we've got a feature in our App (TargetSDK = 30), that scans for devices in the current wifi network. One of the things we do is to call Runtime.getRuntime().exec("/system/bin/ip neigh show") end...

Jetpack compoes lazycolumn skipping frames (lagging)

Hi i'm trying to implement a lazycolumn of a list of posts, I tested it on the emulator api 21 and 29 and it looks kinda smooth on the api 29 it's a little bit laggy, when I tested it on a...

How to resolve build.gradle errors in flutter. How to resolve this error "A problem occurred evaluating project ':app'. > Malformed \uxxxx encoding."

There's an error in build file. I tried everything but nothing worked getting this errorFAILURE: Build failed with an exception. Where: Build file 'D:\Flutter...

android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify

After upgrading to android 12, the application is not compiling. It shows "Manifest merger failed with multiple errors, see logs" Error showing in Merged manifest: Merging Errors: Error:...

android:exported added but still getting error Apps targeting Android 12 and higher are required to specify an explicit value for android:exported

I have added android:exported="true" to my only activity in manifest but still getting below error after updating compile sdk and target sdk version to 31.I also tried rebuilding the project ,...

Android - Receiving string from server after sending an image

I have an android app that opens a socket connection and sends an image to a python server. The image is continously received for as long as the user presses the capture button. However, what I...