我需要更改清单的哪一部分才能将数据从服务发送到恢复时的活动?
我有一个服务,当用户离开应用程序时,该服务继续执行活动正在执行的操作,当用户返回时,该服务将数据发送回活动然后显示,但我不知道该活动的哪一部分明显要改变。示例代码将不胜感激。
I have a service that continues to do what the activity was doing when the user navigates away from the application, and when they return, the service send the data back to the activity to then display, but I don't know what part of the Manifest to change. Sample code would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AndroidManifest.xml 的哪一部分?没有任何。我认为您希望从您的活动中绑定到该服务。然后你就可以直接问了。另外,让服务器在其所做的一切准备就绪时发送广播,以防活动已打开。
What part of the AndroidManifest.xml? None. I would think you'd want to bind to the service from your activity. then you can ask it directly. Also, have the server send out a broadcast when whatever its doing is ready, in case the Activity is already open.