jpush-react-native icon indicating copy to clipboard operation
jpush-react-native copied to clipboard

Android 点击桌面通知消息进入应用,没有触发 addNotificationListener 打开消息的回调

Open yidulishuang opened this issue 1 year ago • 1 comments

你的运行环境

  • "react-native": "0.73.8"
  • "jcore-react-native": "^2.2.1"
  • "jpush-react-native": "^3.1.0"

期望效果

Android 点击桌面通知消息进入应用,并触发 addNotificationListener 打开消息的回调,拿到extras中自定义的url参数完成页面跳转

实际效果

Android 点击桌面通知消息进入应用,没有触发 addNotificationListener 打开消息的回调

重现步骤

  1. 极光后台推送,应用收到推送消息
  2. 点击推送消息进入应用

消息体: { "a_total_user": 1, "api_type": 32, "appkey": "9a55f*****7bcd", "audience": { "alias": [ "merchant_beta_349" ] }, "business_operation_code": "", "client_ip": "10.74.0.89", "data_msgtype": 5, "errno": 0, "h_total_user": 0, "i_total_user": 1, "inapp_message": { "inapp_message": true }, "inappmessage": null, "is_vip": 0, "itime": 1726732862, "live_activity": null, "message": null, "msg_id": "18101708795571583", "notification": { "alert": "订单通知订单通知订单通知订单通知", "android": { "alert": "订单通知订单通知订单通知订单通知", "alert_type": 7, "badge_add_num": 1, "badge_class": "com.piaoniu.merchant.client.MainActivity", "builder_id": 0, "category": "", "extras": {}, "intent": { "url": "intent:#Intent;action=android.intent.action.MAIN;end" }, "large_icon": "", "priority": 0, "sound": "", "style": 0, "title": "订单通知" }, "ios": { "alert": { "body": "订单通知订单通知订单通知订单通知", "title": "订单通知" }, "badge": "+1", "content-available": 1, "extras": { "url": "pnmc://merchant_todo_detail?orderId=11043408" }, "filter-criteria": "", "interruption-level": "active", "mutable-content": 1, "sound": "default", "thread-id": "" } }, "options": { "apns_production": true, "classification": 0, "sendno": "1726732862", "third_party_channel": { "asus": { "distribution": "secondary_push", "distribution_fcm": "secondary_fcm_push" }, "fcm": { "distribution": "secondary_push", "distribution_fcm": "secondary_fcm_push" }, "honor": { "distribution": "secondary_push", "distribution_fcm": "secondary_fcm_push" }, "huawei": { "category": "", "channel_id": "", "distribution": "secondary_push", "distribution_fcm": "secondary_fcm_push", "receipt_id": "", "skip_quota": false }, "meizu": { "distribution": "secondary_push", "distribution_fcm": "secondary_fcm_push" }, "oppo": { "channel_id": "", "distribution": "secondary_push", "distribution_fcm": "secondary_fcm_push", "skip_quota": false }, "vivo": { "callback_id": "", "category": "", "distribution": "secondary_push", "distribution_fcm": "secondary_fcm_push", "skip_quota": false }, "xiaomi": { "channel_id": "", "distribution": "secondary_push", "distribution_fcm": "secondary_fcm_push", "skip_quota": false } }, "time_to_live": 86400 }, "platform": [ "android", "ios" ], "push_type": 4, "q_total_user": 0, "receive_time": 1726732862, "reminder": null, "request_time": 1726732862865, "send_source": 1, "total_user": 2, "w_total_user": 0 }

yidulishuang avatar Sep 19 '24 08:09 yidulishuang

這個問題有人有解決方法嗎?App不在背景的話完全不知道用戶點了什麼

danielchan303 avatar Jul 24 '25 09:07 danielchan303