expo - 如果应用程序未在后台运行,则 Expo-notifications 通知事件不起作用
问题描述
世博SDK:40
responseListener.current =
Notifications.addNotificationResponseReceivedListener((response) => {
axios.post("https://<logUrl.onOurServer.com>", {
test: "background",
});
});
addNotificationResponseReceivedListener // dont work when app's not running
此方法在应用程序运行时向我发送通知邮件,但如果应用程序未运行,我无法从冷启动捕获此事件。是否有许可或其他东西可以使用?我刚刚从https://docs.expo.io/versions/latest/sdk/notifications/复制粘贴了代码, 并将日志记录添加到 https 端点,它在冷启动时不起作用。
解决方案
推荐阅读
- optimization - 如何在 impala 中有效地从单行创建多行
- mongodb - Apache Nifi:首先删除条目,然后在 MongoDB 中插入
- blogger - 灯箱在我的新 Blogger 模板中不起作用
- mysql - 有没有更好的方法来定义这个查询中的时间范围?
- batch-file - 如何使用 1 个 psql 在 1 个批处理文件中执行许多命令?
- trace32 - 条件断点语法
- gstreamer - 如何检查 .pcm 文件的采样率?
- elasticsearch - 在 kibana 中搜索特殊字符
- java - 在 jdbcTemplate.queryForObject(sql, new Object[] { user.getUserId(), user.getPassword() }, String.class); 中出现错误
- matlab - 球的结构元素中的最大偏移高度是多少?