简体   繁体   English

当用户终止/杀死应用程序反应本机时发送推送通知

[英]Sending push notification when user terminates/kill app react native

I have some features in my react native app that wont work if user terminates/kills the app.如果用户终止/终止应用程序,我的 React 本机应用程序中有一些功能将无法使用。

I would like to inform the user that the app has reduced functionality by sending them a push notification if user kills the app.如果用户终止该应用程序,我想通过向他们发送推送通知来通知用户该应用程序的功能已减少。

Is there a way to do this in react native for android and iOS?有没有办法在 android 和 iOS 的原生反应中做到这一点?

You can achieve this via the React Native AppState .您可以通过 React Native AppState实现这一点。

If you also don't have push notifications integrated in your app, heres the package I like to use.如果您的应用程序中也没有集成推送通知,请使用我喜欢使用的package

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

相关问题 单击推送通知时,React本机应用程序进入后台 - React native app goes to background when clicked on push notification 将senderID添加到react-native-push-notification配置时,react本地应用程序立即崩溃 - react native app instantly crashes when adding senderID to react-native-push-notification configure 仅当应用程序在后台时发送推送通知 - Sending a push notification only when app is in background 用户杀死应用程序时,OneSignal推送通知失败 - OneSignal Push Notification Failed when user kill the application 推送通知发送到具有react-native-firebase的其他设备时的问题 - Problems When Push Notification Sending to Another Device With react-native-firebase 我杀死应用程序后未收到Firebase推送通知? - Firebase Push notification is not Received when i kill the app? 使用 react-native-push-notification,App 在收到新的 FCM 通知时崩溃 - Using react-native-push-notification, App crashes when receiving new FCM notification 当应用程序在后台并单击通知时,Android react-native-push-notification onNotification 没有被调用? - Android react-native-push-notification onNotification not called when app is in the background and notification clicked? React Native 中的推送通知 - Push Notification In React Native 从 php web 应用程序发送推送通知以响应本机应用程序 - send push notification from php web app to react native app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM