当应用程序关闭时,通过单击通知来进行页面重定向

问题描述

在应用程序关闭时,如何理解单击及其参数? 我在React-native应用程序上使用了react-native-azurenotificationhub软件包。

打开应用程序时。我们可以了解通知信息。但是我们该怎么做 应用程序关闭时发生的事情。

const NotificationHub = require('react-native-azurenotificationhub');
const PushNotificationEmitter = new NativeEventEmitter(NotificationHub);
const EVENT_REMOTE_NOTIFICATION_RECEIVED = 'remoteNotificationReceived';

useEffect(() => {
   PushNotificationEmitter.addListener(EVENT_REMOTE_NOTIFICATION_RECEIVED,_onRemoteNotification);
},[]);

function _onRemoteNotification(notification) {
    ...actions
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)