android - device.sendUserNotification 没有找到处理 Intent 的活动
问题描述
- 反应原生:0.63.4
- 排毒:18.17.0
- 反应原生推送通知:7.3.1
- 反应原生引导:3.2.4
在 Android 上使用 detox 的 sendUserNotification 时遇到问题,我收到以下错误。
测试失败:未找到处理 Intent 的活动 { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x24000000 pkg=com...******(有附加功能)}
不确定它是否相关,但深度链接在调试中也没有得到解决。
我在 AndroidManifest(Main) 中有这个,并且在复制到调试时仍然发生。
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
</intent-filter>
</receiver>
<service
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/default_notification_channel_id" />
<meta-data
android:name="com.dieam.reactnativepushnotification.default_notification_channel_id"
android:value="@string/default_notification_channel_id" />
</receiver>
解决方案
推荐阅读
- typescript - Arg 用 Typescript 中的默认泛型类型替换 seltf
- c - 可能的?C中没有成员的Typedef枚举,在另一个文件中添加成员
- firebase - Firebase、Flutter - 读取、检索过滤后的数据
- html - jinja2.exceptions.UndefinedError - 试图达到特定值
- swift - SwiftUI onMoveCommand 操作未执行
- qt - QXmlStreamWriter 在不写入任何文本元素时写入根元素的不同开头
- python - 迭代行以分隔具有不同值的行
- html - 隐藏或显示传输图标
- ansible - Ansible:仅在上一个任务成功并创建输出时才触发任务
- vba - 使用带有 introp 的 CefSharp 嵌入 Microsoft Access 表单