更新时间:2023-12-03 16:04:58
您需要将服务绑定到你的活动。一旦服务绑定您可以访问你的服务的方法。看下面这个例子如何 http://developer.android.com/guide/components/bound-services.html
You need to bind the service to your activity. Once the service is bound you can access the methods in your service. Look at this example for how http://developer.android.com/guide/components/bound-services.html
您还可以将监听器添加到您的服务,让你活动将立即通知时的数据变化
You can also add a listener to your service so that you activity would be instantly notified when the data changes