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

At onResume() how to identify if onPause() was called because of screen lock or app minimised

I have a binder service which binds at onResume. At onResume I want to check if the previous onPause was called because of app minimised or screen was lock by lock button. I have tried with ACTION_SCREEN_ON and ACTION_SCREEN_OFF and setting a…
0
votes
1 answer

Getting illegal argument exception in mediabuttonreceiver

I am trying to play song in my service and I am able to play it successfully for lollipop and above device .I saw some tutorial and it show that using the classname method we can do it for pre lollipop device this is what i am getting as error …
0
votes
1 answer

Does Service needs another parser?

I have already been fetched data from instagram api. But i cannot reach that data to use it on my service. I have tried all methods that i know. **Here is my main object: ** If my followers count is increases or decreases, notify, And check that for…
0
votes
1 answer

Cannot get my Android bound service to work with my network listener code

The Android application I am working on, communicates with a "server" running on the same device as my app. Since I will need to be constantly listening to this server, I decided to make it a bound service. I looked at the official Android…
Brian
  • 1,726
  • 2
  • 24
  • 62
0
votes
1 answer

Android: cannot bind to already running service, onServiceConnected not called

I have running service (previously successfuly binded, started and unbinded with main activity): Intent startingIntent = new Intent(this,…
Johnny
  • 193
  • 1
  • 1
  • 8
0
votes
1 answer

Is a bound service destroyed when the last activity that is bounded with the service is destroyed?

I've read the official android docs and they say that A bound service runs only as long as another application component is bound to it. Thus, I understand that if I have an Activity and call a Service from that Activity, then when an activity…
Mateut Alin
  • 1,173
  • 4
  • 17
  • 34
0
votes
1 answer

How to Call Remote Method service?

I'm developing in app, in which user can add weather card to know city weather. I'm able to populate cities with Google Places Autocomplete API & also can able to retrieve weather of selected city. But my problem is as weather data is not fixed, it…
0
votes
1 answer

Send Request from my android application and get request from another application?

I'm developing two android applications. Now I want to send 'Hello' string from my first App to my second App. My second application have to receive that 'Hello' string and concatenate ' world' and have to response as 'Hello world'. After that I…
JEGADEESAN S
  • 566
  • 1
  • 6
  • 19
0
votes
1 answer

Is it possible to establish communication between two services which are running in two different process?

Let's say i have started a service1 from my app APP1. There is another service already running and that was not started from my App1 and say it's service2. Now, is it possible to establish communication between these two services.
saa
  • 1,538
  • 2
  • 17
  • 35
0
votes
1 answer

Service is getting killed after killing the application

UPDATE I have an Activity where I am starting a service which is running successfully. I am trying to keep bluetooth connectivity in the service. Bluetooth connectivity is running successfully through service when the application is active. But when…
user7481832
0
votes
1 answer

Android AIDLTokenType.IDENTIFIER expected, got rpc error in AIDL file

I have such aidl file: package com.my.service; import com.my.common.rpc.OnNextListener; interface IService { oneway void acceptStateListener(in OnNextListener l); } And I got an error in my Android Studio: AIDLTokenType.IDENTIFIER expected,…
msangel
  • 9,895
  • 3
  • 50
  • 69
0
votes
2 answers

Android check if service is running from another application

I'm writing two applications that cooperate together one collecting data (using a service) and the other is a custom keyboard getting the data from the service and writing them to whatever text field is selected. All this is working fine my only…
Tychus
  • 170
  • 3
  • 14
0
votes
2 answers
0
votes
1 answer

2 media services being played simultaneously

After pressing back button on MainActivity (which calls it's onDestroy()), the media plays in the background (using foreground service). But after opening the app again ((which calls it's onCreate()), and if I try to play another song, the first…
0
votes
2 answers

Music Play Next and Play Previous are not working in Android studio

I had 2 Activities (namely MainActivity which shows list of songs and a default media controller at the bottom, and a AndroidBuildingMusicPlayerActivity with a custom made layout for playback) and a Bound Service. The issue is playNext and…