oracle / pushiomanager-react-native

React Native Module for Responsys SDK
Universal Permissive License v1.0
15 stars 17 forks source link

Background push notifications #37

Open LuanCassiano opened 2 years ago

LuanCassiano commented 2 years ago

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?

joaovtpereira commented 2 years ago

Hi Luan,

i had the same problem in a project I worked on, apparently for Android it is necessary to activate a function called "High Priority".

Contact Oracle support that possibly this problem will be solved.

mlgamarra commented 2 years ago

Hi Luan,

i had the same problem in a project I worked on, apparently for Android it is necessary to activate a function called "High Priority".

Contact Oracle support that possibly this problem will be solved.

Hi I have the same problem, can you give me some information, please, on how to solve it?