Support Topics Documentation Slack YouTube Blog

Receiving Push Notification only from Dashboard

react

(Marcio Prudencio) #1

Hi Guys, my Android devices only receive notifications published from Backendless Dashboard. It’s not receiving any notification published from the App.

*iOS devices are working properly, sending and receiving all notifications. From Dashboard and App.

Publishing through API request.

Push

Any clue to help me out? Regards


(Vladimir Upirov) #2

Hi Marcio
Do you use backendless-react-native module, if you do, please upgrade the package to the latest version 0.0.16, we have fixed an issue when android RN app crashes on push notifications sent not through Console

Regards, Vlad


(Vladimir Upirov) #3

btw, can use see any error log (in native module) for android app?


(Marcio Prudencio) #4

Hi @vladimir-upirov, I updated to 0.0.16 and still not receiving notifications when published from the App. Only from the Dashboard. Couldn’t find any error, maybe I’m not looking in the right place.

Still have the initApp error on iOS tough, which is solved by commenting these lines on node_modules index.js (for iOS only, which I had to do all times when I use yarn).

//Backendless.initApp = function (appId, apiKey) {
// NativeModule.setAppId(appId);

// return _initApp.apply(this, arguments)
//};


(Vladimir Upirov) #5

do you run your android app in AndroidStudio? for me it’s way better for debugging native code

make sure the fix is present in native module, maybe there are linking issues after upgrade

and could you please share what keys androidHeaders object contains

about IOS, could you please remind me what kind of error have you got, because commenting those lines is not good idea, the native modules require your appID,


(Marcio Prudencio) #6

No @vladimir-upirov, I’m working on Visual Studio. It’s great for JS and (PushNotificationiOS from react-native) does the job, you need nothing else for iOS. Installing backendless-react-native in order to work with push notifications on Android only.

My header keys (just text):


(Vladimir Upirov) #7

try to replace “android-ticker-text” header with “android-content-title”

android-ticker-text -> android-content-title = notifications.newOrder…
android-content-title -> android-content-text = notifications.respond…

not sure the issue is here with headers, but maybe it helps

anyways, the best way to find the problem it’s debuggin
set breakpoint to place in code where the push arrived (from Console)
and then send a notification through api and see if the notification is arrived


(Marcio Prudencio) #8

@vladimir-upirov I checked the files on reactlibrary they seem to be all there but still not working. Also, the App did not start on iOS due to the initApp function. That’s why I’m not using backendless-react-native for iOS. As you can see I’m initializing on App.js but seems not working.

"backendless": "^5.2.0",
"backendless-react-native": "^0.0.16",


(Vladimir Upirov) #9

I’ve created an internal ticket BKNDLSS-18440 to investigate/fix the issue

Regards, Vlad


(Marcio Prudencio) #10

Hi @vladimir-upirov any follow up on this matter? I also got an RNBackendless error on proguard when tried to generate a release version.

There’s any alternative to publish Push Notification from Backendless without using this backendless-react-native module?


(Vladimir Upirov) #11

Hi Marcio,
Yeah, we are still working on it, we completely reworked iOS native module, and we’ve got rid of dependency on node_modules/react-native/Libraries/PushNotificationIOS/RCTPushNotification.xcodeproj and currently we are on the testing stage, I believe it will be release on this week

There’s any alternative to publish Push Notification from Backendless without using this backendless-react-native module?

publishing push notifications is related only with JS-SDK,
and backendless-react-native takes care about:

  • retrieving device token, version, uuid
  • receiving/displaying push notifications

Regards, Vlad


(Marcio Prudencio) #12

Thanks @vladimir-upirov, understood. I’ll wait for the new version.