So you want to start using push notifications in your new shiny mobile app written in React Native. But if youβre new to mobile development and you...
For further actions, you may consider blocking this person and/or reporting abuse
when i runned my code i get this error
TypeError: Cannot read property 'refreshToken' of undefined
This error is located at:
in NavigationContainer (at DrawerNavigator.js:18)
in component (at SceneView.tsx:98)
i don't know if i am missing something but i followed every point of instruction
same issue here did find any solution???
Hi @jakubkoci , thanks a lot! This article helped me a ton!
On file PushNotificationsManager.js, I had to remove the Android OS check, right before the
Notifications.getInitialNotification()
, in order to get the initial notification on iOS.Thanks, @rodrigo98rm , you're right. You saved me, I had an issue with it today π I fixed it in the article.
i get this when i tried the first section of the code
typeError null:null is not an object evaluating.this.nativeCommandModule.refreshToken
can not ready refreshtoken of undefined
did you fix it ???
Me too, I'm having the same problem.
"react-native": "0.62.2",
"react-native-notifications": "^3.2.2",
@jakubkoci great article! the instructions for sending PNs via the curl are awesome.
question, did you ever have any issues getting the ios event handlers to trigger? I've been using the react-native-notifications library for a couple weeks now and am running into some issues in iOS.
I opened a GH issue here if you have any time to look: github.com/wix/react-native-notifi..., if not, no worries!
With
how to access the token inside RootScreen without using Redux ?
That's really a very much helpful one.
I've succeeded to integrate push notification in my react native application. Thanks.
One issue found with versioning of google services and min SDK versino, by upgrading all services and everything now works fine now.
Hello good article, also an excellent service for Push Notifications is with the INDIGITALL Service, it allows to send Push Notifications with also geo-located images, programmed among many more functions, here is the link of the documentation to install it easily: https: // docs.indigitall.com/es/
how to access the token inside RootScreen without using Redux ?
With
, how to access the token inside RootScreen without using Redux ?
1) Notifications.events().registerNotificationOpened, Notifications.events().registerNotificationReceivedBackground
and Notifications.getInitialNotification() is not triggered if u are using with splash screen.
2) For custom icon and color on notification, add icon into all res/mipmap-*
and then use meta-data tag _
Modify the AndroidManifest Like this for resolving above points:
package="com.rnb_boilerplate">
In the current version of the lib, the only icon name that worked for me was
@drawable/notification_icon
You can find the reason for that in the code, I opened a PR to update their docs, but for now I'll leave it here to save somebody else some hours of trial and error
Hello,
I have a quick question if you can help me please:
My react project is a simple Web view with integration of FCM notifications, and for that I have to send the token device by injection of javascript when calling the webview.
Anyone have an idea please?
Thank you
Awesome article, i had to change few things to get it working for my Android, still have not tested on IOS.....
below not required by firebase and if you keep might get error of google-play version bla .
implementation 'com.google.firebase:firebase-core:16.0.0'
wish it would be auto link react-native-notifications but we have do it manually...
below is not required so dont add it to MainApplication.java
packages.add(new RNNotificationsPackage(MainApplication.this));
rather than that till demo checking its working great, i will do some more digging on it..
Hi
In android remote notifications show at statusbar on mobile not a popup, Please help me
How do I clear this notification alert?
How to clear the notifications, if there are multiple notifications in the notification pane when user opens one of them?
Hi, sorry for the silly question
but im having a problem with the following line
"<Provider store={store}>"
Is there something that I am missing or not doing right?
Thanks
That's only when you use Redux in react native. You don't need that for push notifications.
Can you desing or customize the notification ? I need to do a player controler in expo, and I dont know if its posible ... :/
Great article, I'm receiving the window push notification while it's in background but not in foreground, does it close automatically?
Did you solved the issue Willy?
"FCM can be used only for Android." This is not entirely true, you should be able to send a APNs message with FCM based on their docs: firebase.google.com/docs/cloud-mes...
Oh, I see. I meant it in a way it's not necessary to set an iOS project in Firebase console. I rephrased it a little. I agree it was written wrongly. Thanks for pointing it out.
I really like this code! Congratulations.