推送通知 – 颤动:即使应用程序已关闭,也会推送通知

推送通知 – 颤动:即使应用程序已关闭,也会推送通知,第1张

概述我已经构建了一个带有颤动的应用程序,就像提醒一样. 即使应用程序已关闭,如何向用户显示通知? 对于提醒我会建议 Flutter Local Notifications Plugin.它有一个强大的调度api.从本地通知的文件: Scheduling when notifications should appear – Periodically show a notification (interv 我已经构建了一个带有颤动的应用程序,就像提醒一样.
即使应用程序已关闭,如何向用户显示通知?解决方法 对于提醒我会建议 Flutter Local Notifications Plugin.它有一个强大的调度API.从本地通知的文件:

Scheduling when notifications should appear – Periodically show a
notification (interval-based) – Schedule a notification to be shown
daily at a specifIEd time – Schedule a notification to be shown weekly
on a specifIEd day and time – Ability to handle when a user has tapped on a notification when the app is the foreground,background or terminated

对于推送通知,您可以使用Firebase Cloud Messaging
或one signal插件,也可以通过platform-channels本地实现

编辑:即使应用程序终止,您也可以根据特定条件触发通知.这可以通过在后台运行dart代码来实现.引用官方常见问题解答:

Can I run Dart code in the background of an Flutter app? Yes,you can run Dart code in a background process on both iOS and AndroID. For more information,see the Medium article 07004

总结

以上是内存溢出为你收集整理的推送通知 – 颤动:即使应用程序已关闭,也会推送通知全部内容,希望文章能够帮你解决推送通知 – 颤动:即使应用程序已关闭,也会推送通知所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1001918.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存