[英]Send notification when app is not running
First of all I don't know what type of code to put for my problem.首先,我不知道要为我的问题输入什么类型的代码。
I'm developing an Android mobile game, with two ways to earn ruby, via mini transactions or via the OfferWall IronSource.我正在开发一款 Android 手机游戏,有两种赚取 ruby 的方法,通过迷你交易或通过 OfferWall IronSource。
Regarding the OfferWall, those are tasks to complete to then receive Ruby in exchange.关于 OfferWall,这些是完成然后收到 Ruby 作为交换的任务。
Now my problem that I would very much like to solve现在我非常想解决的问题
When a user completes a task and the app is not running, how can I send a notification?当用户完成任务而应用程序未运行时,我该如何发送通知?
zigg, my suggestion would be to call firebase notification while running background service or you can use push notification as Blundell suggested in background service. zigg,我的建议是在运行后台服务时调用 firebase 通知,或者您可以使用后台服务中 Blundell 建议的推送通知。
The background service will run even if the app is not running.即使应用程序未运行,后台服务也会运行。 I use foreground services and call push notification in the service when the app is closed or in background.
当应用程序关闭或在后台时,我使用前台服务并在服务中调用推送通知。
Hope this helps.希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.