Skip to content
/ notif Public

Programmatically send custom push notifications to your phone

License

Notifications You must be signed in to change notification settings

petabite/notif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notif

Programmatically send custom push notifications to your phone. Implemented using Expo.

screenshot

Features

  • Send a push notification to your phone from anywhere
  • Push notification history (only while the app is open 🤔)

Installation

  1. Clone this repo
  2. npm install
  3. Download 'Expo Go' on your physical device (this won't work in the simulator)
  4. expo start
  5. Scan the QR code with your Camera app

Sending Push Notifications

  1. Grab the push token from your device. Keep this a secret!

    (TIP: Tap the token to copy it to the clipboard)

  2. Send a request to Expo's Push API:

    curl -H "Content-Type: application/json" -X POST "https://exp.host/--/api/v2/push/send" -d '{
       "to": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
       "title":"hello",
       "body": "world"
    }'

    See this doc for more info.

About

Programmatically send custom push notifications to your phone

Topics

Resources

License

Stars

Watchers

Forks