jpush / jpush/jpush-react-native

app退出后点击推送notificationListener接收不了消息

Open
#783 0 comments 0 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

你的运行环境

mac android

  • 插件版本:
  • react-native 版本:0.61.5

期望效果

在app退出状态下可以获取用户点击推送的信息,处理页面跳转。

实际效果

app退出状态下notificationListener无法接收用户点击推送的详情,无法进行业务逻辑

重现步骤

  1. 退出app
  2. 推送通知
  3. 点击推送
  4. 打开了app,但是无法获取推送相关信息

app.js部分代码

JPush.init();
        //连接状态
        this.connectListener = result => {
            // this.log("connectListener:" + JSON.stringify(result))
        };
        JPush.addConnectEventListener(this.connectListener);
        //通知回调
        this.notificationListener = result => {
            JpushEvent.emit('notificationListener',result);//event事件派发至负责jpush通知逻辑处理处
        };
       JPush.addNotificationListener(this.notificationListener);

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 app.js entry point and the JPush.addNotificationListener registration shown in the report. Reproduce the cold-start flow on Android, then trace how notification click data is delivered when the app is opened from a terminated state. Done means the listener receives the push details needed for navigation after that flow.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.