jpush / jpush/jpush-react-native

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

Open
#958 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.4k
Forks
348
PR merge metrics
No merged PRs in 30d

Description

你的运行环境

  • "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
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Android handling behind addNotificationListener and reproduce the notification tap using the supplied React Native, jcore-react-native, and jpush-react-native versions. Done means tapping an Android notification invokes the listener and exposes the custom extras URL for navigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.