onServiceConnected() not called

前端 未结 7 1349
情书的邮戳
情书的邮戳 2020-12-30 01:41

I have a problem with using a background service.
I am using the service from 2 activities.

The first activity starts the Service with start

相关标签:
7条回答
  • 2020-12-30 02:31

    After some more research, I discovered this is a known issue in Android.

    The second activity I was talking about was an activity which is used as content within a TabActivity.

    The way to fix this was to call bindService(...) on the application context, instead of on the activity context using getApplicationContext().bindService(...)

    0 讨论(0)
提交回复
热议问题