oracle / oracle/pushiomanager-react-native

Background push notifications

Open
#37 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
19
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Hi,

I implemented the code below, but I don't receive the notification in the background

import messaging from '@react-native-firebase/messaging';
import PushIOManager from '@oracle/react-native-pushiomanager';
import { AppRegistry } from 'react-native';

messaging().setBackgroundMessageHandler(async remoteMessage => {

PushIOManager.isResponsysPush(remoteMessage, (error, response) => {
             
    if (response) {

        // Push notification received from Responsys.
        PushIOManager.handleMessage(remoteMessage);

    } else {

        // Not a Responsys push notification, handle it appropriately.
    }
});

});

AppRegistry.registerComponent(appName, () => App);

the version of firebase messaging is 13.1.0. Is a specific version needed?

Contributor guide

Open the contributing guide

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 background notification behavior using the shown setBackgroundMessageHandler code and @react-native-firebase/messaging 13.1.0. Inspect how the background message reaches PushIOManager.isResponsysPush and handleMessage; done means a Responsys notification is received and handled while the app is in the background.

Written by the indexing model from the issue text.

Assessment

Tech stack
firebase, javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.