How do I publish an update to Dashclock when my application receives an Intent?

馋奶兔 提交于 2019-11-29 12:47:04

Since the extension service must issue the publishUpdate call, your proximity trigger broadcast receiver should use something like a broadcast or an event bus to ask the extension to publish an update.

If the extension isn't initialized, meaning the user hasn't added it or DashClock isn't running, then nothing will happen, which is the expected and correct behavior. As soon as DashClock starts and your extension is added, onUpdateData will be called and you'll be able to publish your update.

For some ideas on the actual classes you can use, see below:

A full code snippet for global broadcasts can be found in issue 292 on the DashClock project page.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!