Using getApplicationContext().bindService instead of just bindService on your activity solves the problem as it is using the higher level application context.

本文探讨了在Android应用开发中使用ApplicationContext与bindService方法的问题,并提出了解决方案,即通过使用更高层级的应用上下文来解决服务连接失败的问题。
Using getApplicationContext().bindService instead of just bindService on your activity solves the problem as it is using the higher level application context.


被折叠的 条评论
为什么被折叠?