jpush / jpush/jpush-react-native

ios app切到后台,获取不到推送的内容,不进入JPushModule.addReceiveNotificationListener方法

Open
#632 6 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

你的运行环境

  • 插件版本:
  • react-native 版本:"0.59.5"
    "jcore-react-native": "^1.3.2",
    "jpush-react-native": "^2.5.3",

期望效果

ios app切到后台,能获取到推送的内容

实际效果

ios app切到后台,获取不到推送的内容,不进入JPushModule.addReceiveNotificationListener方法

重现步骤

  1. app切到后台
  2. 发送推送
  3. 不进入JPushModule.addReceiveNotificationListener方法
    4.app在前台是,是可以进入JPushModule.addReceiveNotificationListener方法

Debug logs

包括 Android 或 iOS 的日志:

`JPushModule.setupPush();

        JPushModule.setBadge(0, success => {})

        //接收到通知
        this.receiveNotificationListener = map => {
            console.log('addReceiveNotificationListener:'+JSON.stringify(map));
        }
        JPushModule.addReceiveNotificationListener(this.receiveNotificationListener);`

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 by reproducing the iOS background case with React Native 0.59.5, jcore-react-native 1.3.2, and jpush-react-native 2.5.3. Read the integration around JPushModule.addReceiveNotificationListener and compare it with the foreground behavior; the issue is done when background notifications reach the listener with their content.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.