Support Topics Documentation Slack YouTube Blog

Notification not triggering the App

react

(Marcio) #1

Hi @vladimir-upirov, I just notice the notification is not being able to trigger the App (Android) anymore. I’m receiving the notifications with App open, closed and in Background. But when I tap on the notification bar it just closes the top bar without triggering the App even when the App is in the background it does not bring it to the foreground.

If I tap in the notification with the App in the foreground now it crashes the App.

Could you please confirm this behavior? If this might be related to RN or Android? Regards


(Vladimir Yalovy) #2

Hi @MARCIO_PRUDENCIO

Could you describe your problem in more detail? Describe, please, the steps you take so that I can reproduce the problem.


(Marcio) #3
  1. Send you a notification. (Any, can be from Dashboard)
  2. Tap on the notification to open the App (from top bar).

Cases:

a) App is open: It will bring the app to the background (not functional anymore). If you bring the App to the foreground it will start again.

b) App is in Background: It will close the App with message: App keeps stopping… App info / close app

Does not shout any error on debug to be tracked.

Device is Android. Regards


(Vladimir Upirov) #4

Hi Marcio

I just checked it with this app https://github.com/Valodya/backendless-react-native-example

a) App is open: It will bring the app to the background (not functional anymore). If you bring the App to the foreground it will start again.

looks like it works for me, on tap it brings application up

b) App is in Background: It will close the App with message: App keeps stopping… App info / close app

looks like it works for me as well, on tap it starts the application

could you clone my app from github, replace any api/secret keys with yours and try to reproduce the issue

Regards, Vlad


(Marcio) #5

Thanks @vladimir-upirov, I’ll work on this today. Regards


(Vladimir Upirov) #6

ok, please let me know about any result


(Marcio) #7

Hi @vladimir-upirov I couldn’t sorted-out what’s making the Android app closes after try to open from a notification yet. I check your android files and couldn’t find any specific or different configuration for backendless-react-native.

I was able to run the project on simulator only, couldn’t test the notifications, got an error on the device that I can’t resolve. Does not run on my devices (S9+, J6), did not test on iPhone.

The new project does not contain any dependencies (just backendless-react-native), we don’t need the followed dependencies anymore?

implementation ‘com.google.firebase:firebase-core:16.0.5’
implementation ‘com.google.firebase:firebase-messaging:17.3.4’

I believe I’m trying to resolve the old project with the new module…
https://backendless.com/docs/js/push_push_notification_setup_androi.html


(Vladimir Upirov) #8

hi Marcio

docs for RN is placed here https://github.com/Backendless/React-Native-JS-SDK/blob/HEAD/doc/android/guide.md

I was able to run the project on simulator only, couldn’t test the notifications, got an error on the device that I can’t resolve. Does not run on my devices (S9+, J6), did not test on iPhone.

do you run simulator and real device at the same time? did you try to restart metro-builder and click to “reload JS” button on the device?

could you please provide steps to how you run your app, I use this way:

  • run “npm start” from app root directory
  • open “./android” directory in Android Studio
  • run/debug the app using Android Studio interface

Regards, VLad


(Marcio) #9

Hi @vladimir-upirov I just use the Android Studio to Sync project with Gradle files and open AVD Manager to start one emulator. From this point forward I can just run react-native run-android from VS Code, it will emulate the .apk in all devices available (emulators and devices).

Since I’m working with notifications I’m using real devices directly not emulators. Real devices are also faster some times.

Use again AS to profile, debug the APK to check after assemble the Release.