Questions tagged android-service

Explore the latest questions and answers asked by our top developers.

When using an Android bound service type, can the Server (service) initiate a request to the Client (Activity)?

Via examples on the web, I’ve put together the following test app with a single Activity (MainActivity) and a remote service (MyRemoteService). From MainActivity I’m able to establish a connection and send a message with an incremented message count that the service displays to the user via a toast statement. At some point I hope […]

By Jim
Categorized as android, android-service, bluetooth-lowenergy, ipc

Android 12 breaks AIDL/IPC with runtime permissions on IPC APK

Pre-Android 12 I could create proprietary Bluetooth health device driver service APKs and exchange info with them from a main application via AIDL. The driver APKs have no UI and launch nothing when installed. Though these APKs used Bluetooth and BLE all runtime permissions could be given from the primary application. These APKs could be […]

By Brian Reinhold
Categorized as aidl, android, android-bluetooth, android-service

what is difference between setForeground and setForegroundAsync in kotlin

Hey I am working in WorkManager. My code is running in android 11 and below . I want to support WorkManager for sdk 31(android 12). I am reading doc and it confused for my scenario Backwards compatibility and foreground services. I am adding code please have a look and guide me is my code doing […]

Keep QTcpSocket running when app is suspended

How would I keep a QTcpSocket running when the app is suspended? I have an Android/iOS app that needs to stay partially running in the background. On Android this means keeping a QTcpSocket running after the app is suspended. For Android I have a service that is started with the connection (the connection being a […]

By cj-
Categorized as android, android-service, qt, qtcpsocket

java.lang.IllegalArgumentException: Expedited jobs cannot be delayed

Hey I am working WorkManager in kotlin. I didn’t understand some code and getting me this error. Could you someone explain me in more details. 2022-01-06 16:48:33.501 14483-14483/ E/AndroidRuntime: FATAL EXCEPTION: main Process:, PID: 14483 java.lang.IllegalArgumentException: Expedited jobs cannot be delayed at$ at at at at at at […]

By Vivek Modi
Categorized as android, android-service, android-workmanager, kotlin

ile receiving Exception: bind failed: EADDRINUSE (Address already in use) I have tried but not in use

I am trying to send the files from both side using socket communication . I have create an serverSocket object and create the connection . client = serverSocket.accept(); Now i am able to sending the file from both side , but only one time . when i disconnect and reconnect it i am getting error: […]

By zahid jamal
Categorized as android, android-service, file-sharing, java, sockets

NotificationListenerService stops working after some time

I am trying to make an android app which listens for notifications and send to api. It works well. All methods are working properly. But NotificationListener service stops after some time and cannot start it again. Sometimes even restart does not help. Is there a way to make it work forever? public class NotificationListener […]

How to handle lots of messages being sent from android service?

I am developing an app that communicates using the MAVLINK protocol. I am using dronefleet for this purpose. My app has a service which runs a ReadThread that checks the incoming MAVLINK messages for their type. ReadThread then sends messages to the UI for updating some TextViews with the drone’s information like battery status, etc. […]

By Nancy
Categorized as android, android-handler, android-service, java, mavlink

How to detect if Autofill is enabled for this app

I set the autofill service to be using my android app service at Settings > Additional Settings > Language & input > Autofill service. Now in my app is there a way to check if the autofill service is set to this app? Source: Android Questions

By Kim M
Categorized as android, android-autofill-manager, android-service

Broadcast receiver isn’t starting the intended service on device restart

I have set up a broadcast receiver in my app and I expect it to start a service when my device restarts…This service should push a notification…But the service isn’t getting triggered..Please tell me where I am going wrong..This is my code: AndroidManifest.xml <manifest xmlns:android="" package="com.conquer_app"> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> […]

By Pro
Categorized as android, android-broadcast, android-service, broadcastreceiver, java
1 2 3 43

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us