简体   繁体   English

如何在 flutter 为我的应用程序设置推送通知?

[英]How can I set push notification in flutter for my app?

I have a rate alert feature in my app in which the user can set rate alert for both gold and silver price,I am using socket for fetching gold and silver rate,So how can i set push notification in my app when the price is same as the price chosen by the user,how can i listen to the gold rate stream if my app is in background and how to can i compare the rate by user to the current rate Please help me to sought this out,我的应用程序中有一个汇率提醒功能,用户可以在其中为黄金和白银价格设置汇率提醒,我正在使用套接字获取黄金和白银汇率,那么当价格相同时如何在我的应用程序中设置推送通知作为用户选择的价格,如果我的应用程序在后台,我如何收听黄金汇率 stream 以及如何将用户的汇率与当前汇率进行比较请帮助我找到这个,

I tired Flutter Awsome Package for push notification but the problem is I was not able to schedule notification correctly when the price is same as current live rate in the backgorund.我厌倦了 Flutter Awsome Package 的推送通知,但问题是当价格与背景中的当前实时价格相同时,我无法正确安排通知。

I think your question is not about Flutter, actually.我认为您的问题实际上与 Flutter 无关。 You need to transfer this responsibility to your backend.您需要将此责任转移到后端。 You only need to provide to your database with the Token of the user's device, and the Price and asset he wants to get notification for.您只需要向您的数据库提供用户设备的 Token,以及他想要获得通知的价格和资产。 The backend will handle the asset follow-up and, when the price reaches the user preference, you'll use the provided Token to send him a Push Notification.后台会处理资产跟进,当价格达到用户偏好时,你会使用提供的Token给他发送一个Push Notification。

This way, it will work even though the app is not running in the background这样,即使应用程序未在后台运行,它也能正常工作

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 单击推送通知时,如何在我的 Flutter 应用程序中打开特定页面 - How do i open specific page in my flutter app when click the push notification 如何使用 sqflite 保存我的推送通知并使用 listview 在应用程序中显示保存的通知 - How can i save my push notification using sqflite and show the saved notification inside app using listview Flutter:如何使用 fcm 以编程方式发送推送通知 - Flutter: How can i send push notification programmatically with fcm 如何将带有 postman 的推送通知发送给特定用户? - How can I send my push notification with postman to specific users? 如何折叠 Flutter 中的通知? 使用本地推送通知插件和 CloudFunctions - How can I collapse notification in Flutter? using Local Push Notification plugin and CloudFunctions 如何从我的 Flutter 应用程序(flutter_dialogflow_v2 插件)为 Dialogflow 设置上下文 - How can I set a context for Dialogflow from my Flutter app (flutter_dialogflow_v2 plugin) 不运行时,Flutter应用程序能否在收到推送通知时运行代码 - Can a flutter app run code on receiving a push notification while Not Running 如何在Flutter为我的Android App设置App Check? - How can I set up App Check for my Android App in Flutter? 我们如何在应用程序退出时向特定用户发送推送通知。 - FLUTTER - How can we send push notification to an specific user while app is exited. - FLUTTER 这是否可以通过后端服务器将 FCM 推送通知发送到 flutter 以安排通知,或者这可以在 flutter 应用程序中实现 - Is this possible to send FCM push Notification through backend server to flutter for scheduled the notification or this can be possible in flutter app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM