3.0.1 • Published 2 years ago

nn-expo-push-notifications v3.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

nn-expo-push-notifications

You must create a free NativeNotify.com account to receive an App Id and an App Token, or nn-expo-push-notifications won't work.

Go to https://NativeNotify.com to sign up for free, no credit card required.

What is Native Notify?

Native Notify is a React Native Expo Push Notification service. Native Notify makes React Native Expo Push Notifications simple. With this nn-expo-push-notifications plugin, you can send your first push notification in under 1 minute. Sign up for https://NativeNotify.com for free. No credit card required.

Does nn-expo-push-notifications work in Expo managed-workflow?

Yes, nn-expo-push-notifications works in Expo managed-workflow or Expo bare-workflow. You do NOT have to eject out of Expo to use nn-expo-push-notifications.

Setup Guide:

Step 1: Install

npm i nn-expo-push-notifications 
expo install expo-device expo-notifications

Step 2: Import

Import registerNNPushToken in your App.js file:

import registerNNPushToken from 'nn-expo-push-notifications';

Step 3: Make sure your App.js function is a hook function

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

Step 4: Paste

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.

Example of an App.js component with nn-expo-push-notifications code included:

import registerNNPushToken from 'nn-expo-push-notifications';

export default function App() {
     registerNNPushToken(yourAppId, 'yourAppToken');

     return (
        ...
     )
}

Use

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.

Show your support

Give a ⭐️ if this project helped you!

2.2.1

2 years ago

2.2.0

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

3.0.1

2 years ago

2.1.9

2 years ago

3.0.0

2 years ago

2.1.8

2 years ago

2.1.7

2 years ago

2.1.2

2 years ago

2.0.3

2 years ago

2.1.1

2 years ago

2.1.4

2 years ago

2.0.5

2 years ago

2.1.3

2 years ago

2.0.4

2 years ago

2.1.6

2 years ago

2.1.5

2 years ago

2.0.6

2 years ago

2.0.9

2 years ago

2.0.8

2 years ago

2.1.0

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago