c# - 打开推送通知时的路由
问题描述
我正在为我们的项目使用 React Native Azure Notification Hub 库,单击远程推送通知后,我们一直难以导航到特定的应用程序屏幕。我如何通过本机反应来实现这一点。你能帮我们解决这个问题,或者展示解决这个问题的方法吗?
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
}
解决方案
推荐阅读
- python - 检查 .json 文件是否为空,然后从 python 的目录中删除它
- c# - “类型 {type} 上不存在属性 {property}” - 但它确实存在。OData 配置问题?
- angular - FormGroup 不是 Angular 中的已知属性不会在新创建的视图上触发
- django - Django: How to update a related model when create an other model
- java - 将 XML Parser 功能传递给 Saxon 以进行样式表解析
- c# - C# 挂钩特定键盘击键并停止系统传播
- python - 无法从笔记本下载 .py 文件
- java - 使用 Jackson 序列化 XML“选择”元素
- c# - IFormFile 上的 C# Razor 页面必需属性仅在单击离开时有效
- python - 如何在公司代理后面安装 jupyterlab 扩展?