I have multiple activities in my app, every activity calls bindservice
and unbindservice
to fetch data. In the first activity bindservice
and unbindservice
work fine. In the second activity (which reuses the same service) bind service method works fine, but unbindservice
method gives exception:
IllegalArgumentException: Service not registered:
Please help.
NikkyD's question is very good and it helped find the cause of this exception in my case. To anyone out there experiencing the same problem, make sure that your bindService call and unbindService call are done against the same context. Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With