Relevant push notifications are a great way to boost a user's engagement towards an application. According to some analysis, push notifications increase app engagement by 88%. It’s also curious to see that the click-through rate for push notifications in Android (4.06%) is much higher than in iOS (1.7%).
In this tutorial, you are going to learn how to implement push notifications as an app feature using React Native and Firebase. We will be testing out the notification feature on an Android device, but you can go ahead and try it out on iOS yourself.
There are two main ways you can send push notifications to your app users: local and remote. Local notifications are sent from a React Native application, while remote push notifications are sent from the server or a push notification service such as Firebase Cloud Messaging service (FCM). We will explore both approaches.
Create React Native app
https://reactnative.dev/docs/environm...
npx react-native init Project-name
React Native Firebase
React Native Firebase is the officially recommended collection of packages that brings React Native support for all Firebase services on both Android and iOS apps.
Install the React Native Firebase "app" module to the root of your React Native project with NPM or Yarn:
Using npm
npm install --save @react-native-firebase/app
Using Yarn
yarn add @react-native-firebase/app
https://rnfirebase.io/
Generating Android credentials
On the Firebase console, add a new Android application and enter your projects details. The "Android package name" must match your local projects package name which can be found inside of the manifest tag within the /android/app/src/main/AndroidManifest.xml file within your project.
Notifee
Notifee is a local notifications library and does not integrate with any 3rd party messaging services. This provides developers greater flexibility on how notifications are managed and integrated with new and existing applications.
The library is a successor to the notifications module in React Native Firebase v5. The entire library has been reworked from the ground up focusing on new features, testing, documentation and device compatibility.
https://notifee.app/
Send Notification to React Native App using Firebase Cloud Messaging
Firebase Cloud Messaging is a cross-platform cloud solution for messages and notifications for Android, iOS, and web applications, which is available for free. Using Firebase Cloud Messaging(FCM), we can easily notify a client app about new updates or can send offers or exiting messages to keep them engaged. FCM is the best way to drive user re-engagement and retention. We can also use FCM for the instant messaging(Chat app) as a message can transfer a payload of up to 4KB to a client app.
https://aboutreact.com/react-native-f...
Test FCM Notification with POSTMAN
You have to copy Legacy Server Key from Firebase Console
Note: Firebase has upgraded our server keys to a new version. You may continue to use your Legacy server key, but it is recommended that you upgrade to the newest version.
/ test-fcm-notification-with-postman
/ react-native-push-notifications-with-firebase
Notifee build issue
https://docs.workwithplus.com/com.wik...,
push notification,push notifications,ios push notification,ios push notifications,phone notifications,iphone notifications,push notification service,iphone push notifications,notifications,push notification strategy,cell phone notification,desktop notifications,push notification server,notification app,android push notifications,android notifications,apple push notification service,implementation,push app,push alerts,push message,push messages,react native firebase,react native firebase ios,react-native-firebase,react native firebase android,react native firebase install,react native firebase tutorial,react native ui,react native app,react native ui design,react native firebase install ios,react native code,react native project,react native,react native project setup,react native login,react native tutorial,react native firebase authentication,react native firebase install android,react native push notification,react native push notifications,react native push notification ios,react native local push notifications,react native notifications,react native firebase push notification,react native push notification firebase,react native scheduled push notifications,react native local notifications,react native scheduled notifications,firebase push notification,react native schedule local notification,react native notifications firebase,notifee,notification,react native notifee,notifee notification,nodejs,notifee push notification
#pushnotifcation #android #reactnative #notification