All Projects → just1and0 → expo-push-notification-helper

just1and0 / expo-push-notification-helper

Licence: MIT license
💬🔥This package helps you make expo push notification for React Native easy to use.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to expo-push-notification-helper

coronadev
Aplicativo para consultar a situação global do COVID-19
Stars: ✭ 44 (+37.5%)
Mutual labels:  reactnative, expo
photos
"Fx Fotos" is an opensource gallery app in react native with the same smoothness and features of Google Photos and Apple Photos. It is backend gnostic and connects to decentralized backends like "box", "Dfinity", "Filecoin" and "Crust".
Stars: ✭ 620 (+1837.5%)
Mutual labels:  reactnative, expo
hackerweb-native-2
HackerWeb 2: A read-only Hacker News client.
Stars: ✭ 51 (+59.38%)
Mutual labels:  reactnative, expo
react-native-bottom-bar
Fully customizable BottomBar with unique design shape for React Native.
Stars: ✭ 74 (+131.25%)
Mutual labels:  reactnative, expo
Ecoleta
Projecto construído durante o Next Level Week 1 - Ecoleta by @Rocketseat
Stars: ✭ 46 (+43.75%)
Mutual labels:  reactnative, expo
expo-three-orbit-controls
🎥 Three.js Orbit Controls (Camera) bridged into React Native
Stars: ✭ 43 (+34.38%)
Mutual labels:  reactnative, expo
gameplay-nlw-together
📱 🕹️ Projeto desenvolvido na missão React Native no NLW #06
Stars: ✭ 353 (+1003.13%)
Mutual labels:  reactnative, expo
OneSignal-Codeigniter-Push-Notification
OneSignal is a free push notification service for web and mobile apps. This Codeigniter example makes it easy to integrate your website with OneSignal Push Notifications. https://onesignal.com/ DEMO - http://ci3onesignal.codefort.ru/
Stars: ✭ 27 (-15.62%)
Mutual labels:  push-notifications, pushnotifications
Instabyte
Clone of Instagram made with React Native
Stars: ✭ 36 (+12.5%)
Mutual labels:  reactnative, expo
Expo Chroma Key Camera
Live green-screen effect with Expo and THREE.js
Stars: ✭ 28 (-12.5%)
Mutual labels:  reactnative, expo
Galio
Galio is a beautifully designed, Free and Open Source React Native Framework
Stars: ✭ 2,772 (+8562.5%)
Mutual labels:  reactnative, expo
mobile-messaging-sdk-ios
Mobile Messaging SDK for iOS
Stars: ✭ 45 (+40.63%)
Mutual labels:  push-notifications, pushnotifications
react-native-expo-examples
Learn React Native (Expo CLI) by examples.
Stars: ✭ 167 (+421.88%)
Mutual labels:  expo
4noobs-mobile
App mobile do 4Noobs
Stars: ✭ 69 (+115.63%)
Mutual labels:  expo
fcm
Golang client library for Firebase Cloud Messaging.
Stars: ✭ 22 (-31.25%)
Mutual labels:  push-notifications
Firebase Ios Sdk
Firebase iOS SDK
Stars: ✭ 3,309 (+10240.63%)
Mutual labels:  push-notifications
apns
Vapor APNS for iOS
Stars: ✭ 59 (+84.38%)
Mutual labels:  push-notifications
expo-file-manager
A file manager app made with React Native & Expo
Stars: ✭ 110 (+243.75%)
Mutual labels:  expo
Jfa Pwa Toolkit
⚡️ PWA Features to Any Website (very Fast & Easy)
Stars: ✭ 245 (+665.63%)
Mutual labels:  push-notifications
Django Webpush
Web Push Notification Package for Django
Stars: ✭ 217 (+578.13%)
Mutual labels:  push-notifications

expo-push-notification-helper

All Contributors

Build Status

Code Quality

This package helps you make expo push notification for React Native easy to use.

Installation

Add expo-push-notification-helper to your project by executing

$  npm install expo-push-notification-helper
or
$ yarn add expo-push-notification-helper

You're all set!

Usage

To initialize expo-push-notification-helper import the "initnotify"
//import the initnotify into your project
import { initnotify } from 'expo-push-notification-helper';

//and then use like so
         initnotify();

it's advicable to do this at your top level file.

can also use the callback function. Which returns true on success and false if unsuccessful.
this will also automatically create three channels for your app, "default", "reminders", "chat-messages" .
//import the initnotify into your project
import { initnotify } from 'expo-push-notification-helper';

//and then use like so
         initnotify().then((data)=>{
              if(data){
                //get token
              }else{
                //request for permission
              }
         });

To get expo token of device import the "getToken"
this must be used in a async/await .
//import the getToken into your project
import { initnotify, getToken } from 'expo-push-notification-helper';

//and then use like so

      initnotify().then( async(data)=>{
          if(data){
                console.log(await getToken());
            }else{
              alert('please grant this app notification permission in settings.')
            }
       
        })



To create a new channel import the "newChannel"
//import the newChannel into your project 
import {  newChannel } from 'expo-push-notification-helper';

//and then use like so 
    newChannel("GroupMessage");
on default your channel will be created sound being false but you can change that by adding true as a second input

To send push notification import the "notify"

//import the notify into your project 
import { notify } from 'expo-push-notification-helper';

//and then use like so 
      notify(token, "new message", "hello there how are you doing", "default")
Not you must supply the channel."

Props

all expo-push-notification-helper props

Name Use callback note
initnotify() initialize package, this will ask for notification permission. true, false this will also automatically create three channels for your app, "default", "reminders", "chat-messages" .
getToken() get expo token of device null must be called in async/await
newChannel(name, isSound) create new notification channel true, false isSound is a boolean
notify( token, title, body, channel ) send push notification null without providing a channel. channel will be set to default by default

Contributing

Have a new feature you'd love to add to this project? Make a Send me a pull request! Just follow the guidelines. Thank you!

don't forget to star, like and share :)

Licensing


This project is licensed under MIT license.

Contributors

Thanks goes to these wonderful people (emoji key):


Tomás Vélez Núñez

💻

Ujjal Acharya

📖

Oluwatobi Shokunbi

💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].