Questions tagged [android-service-binding]

In Android applications, a bound service is an implementation of the Service class that allows other applications to bind to it and interact with it. Service binding is used to allow services to be consumed from other components.

In Android applications, a bound service is an implementation of the Service class that allows other applications to bind to it and interact with it. Service binding is used to allow services to be consumed from other components.

More Info

420 questions
0
votes
1 answer

Send data from service to activity without polling

I have a service which maintains connection (Bluetooth Serial Port or TCP connection) with an external system. When data is received on the connection, it should be pushed to the activity which can then parse and display it. Think of a dashboard…
0
votes
0 answers

Android AIDL for local service

Can i able to use the AIDL interface to communicate with the localservice within same package in android? without penalty?
0
votes
0 answers

WebSocket with Service has create new Connection every time startService

I am beginner with using service and webSocket. I am trying to connect and send String on webSocket using Service in Android but when calling StartService(), it gives me anew Connection every time.I need to send text string every time without…
0
votes
1 answer

Android background service location updates and Doze

My app lets people record routes when driving. To ensure locations are actually recorded, i use a service so that they are recorded even if the activity is killed. To avoid the device being put into Doze, which would mean not getting frequent…
0
votes
2 answers

Android : How to detect that the selected audio is being played in Android Studio

I'm trying to make an audio player app, all running smoothly by utilizing activity and services. But there is a constraint when you have selected an audio and play it. Currently when the audio is playing, while selecting the same audio, I make it…
0
votes
3 answers

Android Location From service for every 10 seconds... But location Displays Null,When I changed Activity to Service

I followed this to Get Location Coordinates For Every 10 Seconds So Now Here I want to Change the Activity to Service So that I will start it as Background Service to Get Updates on Location for Every 10 Seconds... But Here I modified UpdateUI()…
0
votes
1 answer

How to set another period to running JobService?

I start new JobService as: JobScheduler jobScheduler = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE); if (jobScheduler != null) { jobScheduler.schedule( new JobInfo.Builder(JOB_ID_LOAD_IMAGE, …
0
votes
1 answer

How to restrict bound service to be called by particular packages

I have written a bound service and I would like this service to be only called from particular app. I do not want other apps to be able to make calls to this service. The options I know so far are: Use a permission. There seems to be 3 secured…
ABS
  • 1,101
  • 10
  • 27
0
votes
0 answers

Why onHandleIntent Not Called in my IntentService

This is my Service Class public class ContactSync extends IntentService { private static final String TAG = "com.ric.connectme.Services.ContactSync"; public ContactSync() { super(TAG); } public ContactSync(String name) { …
0
votes
2 answers

Which context should i use in a service?

I have two services in my application - lA_svc & lB_svc. The MainActivity lauches lA_svc - which context should I use for launching the service from the activity? Now lA_svc sends an intent to launch lB_svc - which context should I use here in the…
0
votes
1 answer

How to rebind to foreground service?

A foreground service is started and immediately bound to. Is there a way to know whether the serivce has been stopped or is still running after an activity restart. The safe way would be to execute startService anyway, but is there a cleaner one?
user6216224
0
votes
1 answer

how to connect bluetooth using AlarmManager Android

I am working in Android with Bluetooth. I can obtain a connection and results from bluetooth device inside MainActivity now, i want to connect and to interact with the bluetoth device from a AlarManager when app is dead. actually, i have the source…
0
votes
1 answer

Upload data in the background depending on the connectivity

I am having problems with understanding how to approach this problem as I am really new to xamarin and android both. My problem is the following: I need to develop an android app, which takes photos of things and uploads them to a rest server. The…
0
votes
1 answer

App is getting killed even after using Service

I want to make my app run always even after removed from App tray by the user. After terminating app ,it didn't pertain in background. I created MyService class which has a AsyncTask which download content from web. It works all fine but unable to…
0
votes
1 answer

How can we prevent Android-Remote-Service from getting killed by OS ,because of low memory?

I have an android remote service which is accessed and use its functionalities by client apps through AIDL. I have some doubts regarding that about the low memory case.While the remote service is used by multiple clients/apps, probably had a chance…
SachinS
  • 2,223
  • 1
  • 15
  • 25