如何从服务的OnStart()内调用一个活动的非静态方法?
解决方案如何从服务的OnStart()?内部调用一个活动的非静态方法
您不能。
不过,有很多方法可以有一个服务与运行的活动交流,我概述了一些他们在这里的:How我可以从一个后台服务更新在Android活动信息
How to call an Activity's non-static method from inside a service onStart()?
解决方案How to call an Activity's non-static method from inside a service onStart()?
You can't.
However, there are many ways to have a service communicate with a running activity, and I outline some of them here: How can I update information in an Android Activity from a background Service
上一篇:获取字符串从捆绑的android返回null字符串、android、null
下一篇:为什么启动我的活动不包含额外的数据我把我送到给startActivity的意图的意图()?意图、我的、把我、不包含