Questions tagged [onserviceconnected]

12 questions
6
votes
1 answer

Is onServiceConnected only called after Service onCreate?

In my current Android Project, I am starting a Service via startService(), then afterwards I am binding to the Service with bindService(). (I do this because I want to have a started Service I am able to communicate with, nevermind) After the…
Dominik Seemayr
  • 830
  • 2
  • 12
  • 30
5
votes
1 answer

onServiceConnected not called after enable my AccessibilityService

After I open my app, it jumps to the accessibility settings. But the onServiceConnected is not called after I have turned on my AccessibilityService (which is called VoiceService). Could you please tell me what should I do? It seems that the…
Violynne
  • 71
  • 1
  • 4
3
votes
2 answers

Android in-app billing: onServiceConnected is never called and bindService returns "false"

I'm currently try to add in-app billing to my app so that users can make a small donations. I use the latest version of Android Studio for development and am following this guide (step by step and I am doing every exactly like mentioned... at least…
1
vote
2 answers

onServiceConnected() not called in second App

I have two apps which should bind to a Service. App 1 starts the service, if it is not already started. startService(new Intent(this, Listener.class)); Then it binds the service. bindService(new Intent(this, Listener.class), mConnection, 0); After…
1
vote
1 answer

Android Service donot get Bound

Hi I am new to android and exploring the services part.I could not bind the service using bind method.I could not figure out whether it is problem with bind method or on service connected.Someone please help me with it.Thanks in advance Activity…
1
vote
2 answers

AccessibilityService all onserviceconnected but it doesn't work

I'm doing some task with the accessibility service. All works great, but I need to remove the configuration of my xml and run the service from the onServiConnected configuration method and here is where I have the problem. I can see in the log that…
S.P.
  • 2,274
  • 4
  • 26
  • 57
1
vote
1 answer

nullpointer exception at onServiceConnected()

Edit 2 : I just realized that I didn't initialize info with new AccessibilityServiceInfo , I'm just stupid. I'm trying to use AccessibilityService to listen and retrieve information of notifications from my other apps to the phone (youtube ,…
0
votes
2 answers

AccessibilityService stops working after a while

I have a call recorder app. As you know, for Android 10 and above, I have to use the AccessibilityService. Everything is working just fine from the start but after a while onServiceConnected is no longer running even though accessibility service is…
0
votes
0 answers

How can I call multiple remote services from an activity

How can I call multiple remote services from an activity? It seems that you can only have one onServiceConnected() in an activity? Can onServiceConnected() connect to multiple remote services at the same time?
0
votes
1 answer

ServiceConnection returns me false always

I am trying to bind a service in the MainActivity, the bind service is bound by a intent that is created in the method updateTheNotification() defined inside MainActivity as given below : public void updateTheNotification() { Intent…
0
votes
1 answer

Android: onServiceConnected not called after bindService

None of the many similar questions I have found have helped to solve my issue. Here are some questions I've looked at: ServiceConnection.onServiceConnected() never called after binding to started service onServiceConnected never called after…
DerStrom8
  • 1,311
  • 2
  • 23
  • 45
-3
votes
1 answer

onServiceConnected is not called after bindService after 3 or 4 launch of application

I am facing a weird issue .On launch of my app I am connecting Activity to service.Service connection is getting established successfully and works fine in Samsung galaxy S5 and other devices too.But in other devices like Moto E , Moto G etc it…
Shakeeb Ayaz
  • 6,200
  • 6
  • 45
  • 64