You must create a free NativeNotify.com account to receive an App Id and an App Token, or native-notify won't work.
Go to https://NativeNotify.com to sign up for free, no credit card required.
Native Notify is a React Native Expo Push Notification service. Native Notify makes React Native Expo Push Notifications simple. With this native-notify plugin, you can send your first push notification in under 1 minute.
Sign up for https://NativeNotify.com for free. No credit card required.
Yes, native-notify works in Expo managed-workflow or Expo bare-workflow. You do NOT have to eject out of Expo to use native-notify.
npm i native-notify
expo install expo-device expo-notifications
Import registerNNPushToken in your App.js file:
import registerNNPushToken from 'native-notify';
Your App.js function MUST be a hook function, or your push notifications will NOT work. Here is an example:
export default function App() {
...
}
This link explains how hooks work: https://reactjs.org/docs/hooks-intro.html
Paste this code into your App.js component in the App function:
registerNNPushToken(yourAppId, 'yourAppToken');
You must go to https://NativeNotify.com to receive a free App Id and App Token, or the registerNNPushToken function will not work.
It's free to sign up. No credit card required.
import registerNNPushToken from 'native-notify';
export default function App() {
registerNNPushToken(yourAppId, 'yourAppToken');
return (
...
)
}
The registerNNPushToken function will register your user's Native Notify push notification token and will return a data object. You can then send your users push notifications in the https://NativeNotify.com push notification portal.
You can send data objects with your Native Notify push notifications. Once a user taps on your Native Notify push notification, the value of the data object will be returned to the pushDataObject variable. You can use this value to do things like redirect your users to a particular screen once a Native Notify push notification is tapped.
Give a ⭐️ if this project helped you!