开发者

Service is not getting disconnected on calling unBindService()

i have implemented and inter-process communication using Binder in my android project. My activity & service开发者_StackOverflow中文版 are running the same application. i have disconnected from the service by calling unbindService(intent) & the service is destroyed. But am able to call the public method which is already destroyed... how to solve it?


Even if you unbind the connection of service, there is a chance that another connection still existed somewhere within the application. Therefore it's the best practice if you call stopService() in activity to destroy the service or stopSelf inside the Service itself.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜