意图调度系统和前台调度系统之间的差异
谁能说出前台调度系统和意图调度系统之间的区别吗?我什么时候应该使用前台调度系统?
Can anyone tell the differences between Foreground dispatch system and Intent dispatch system? when should i go for Foreground dispatch system?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
意图调度系统是从头开始启动一个程序。例如,您打开手机并将其悬停在标签上。手机发出意图,将其识别为 Mifare 卡。您的应用程序有 Mifare 卡的意图调度,因此它是可以选择的应用程序之一。如果您的意图调度足够具体(与其他应用程序相比),它将是唯一可供选择的应用程序,并将在此时运行。
您的应用程序在运行时使用前台调度。这样,如果另一个应用程序具有类似的意图调度设置,您的应用程序将不会被关闭。现在,当您的应用程序运行时,它可以发现标签并处理手机上其他应用程序的意图,并且手机不会提示您从一堆具有类似意图调度的应用程序中进行选择。
我希望这不会令人困惑!
The intent dispatch system is to launch a program from scratch. For instance, you turn your phone on and hover it over a tag. The phone launches an intent, identifying it as a Mifare card. Your app has an intent dispatch for Mifare cards, so it is one of the apps that can be selected. If your intent dispatch is specific enough(compared to other apps), it will be the only app to select, and will run at that point.
Foreground dispatch is used by your app while it is running. This way, your app won't be turned off if another app has a similar intent dispatch setup. Now with your app running, it can discover a tag and handle the intent over other apps on the phone, and the phone will not prompt you to select from a bunch of apps that have a similar intent dispatch.
I hope that was not to confusing!