开发者

android activity cannot bind to service

I managed to connect an activity to a service and it runs ok. This is my first activity in the application. However, if i progress (with or without binding to the service in the first activity), the next activity (resides in a tab) will not bind to the service.

note that if i make the trouble-making activity to be my first in the app, it works fine.

any hints on what might cause the pb? the code in the 2 activities is the same. might it be because of the tabbing? do i need to setup any particular i开发者_StackOverflow中文版ntent filtering stuff>? (i only have the default intent filtering that comes with the template)

Thanks. Alex


apparently this is a known issue:

http://code.google.com/p/android/issues/detail?id=2665


As a workaround, you can use getApplicationContext().{bindService,unbindService}

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜