Giter VIP home page Giter VIP logo

pushwoosh-react-native-plugin's Introduction

React Native Pushwoosh Push Notifications module

GitHub release npm license

platforms

Guide Documentation Sample

Installation

npm install pushwoosh-react-native-plugin --save
react-native link pushwoosh-react-native-plugin

For Android platform, also add the following lines to your project's build.gradle:

//you should already have buildscript and dependencies blocks in your project's build.gradle so just put the classpath line there
buildscript {
 dependencies {
 classpath 'com.google.gms:google-services:4.3.3'
 }
}

//add these lines to the very end of your build.gradle
apply {
 plugin com.google.gms.googleservices.GoogleServicesPlugin
}

Usage

import Pushwoosh from 'pushwoosh-react-native-plugin';

Pushwoosh.init({ 
    "pw_appid" : "YOUR_PUSHWOOSH_PROJECT_ID" , 
    "project_number" : "YOUR_GCM_PROJECT_NUMBER" 
});
Pushwoosh.register();

In order to use custom notification handling on iOS specify the parameter "pw_notification_handling" to "CUSTOM" when initializing the plugin(If no value specified Pushwoosh notification handler is used):

import Pushwoosh from 'pushwoosh-react-native-plugin';

Pushwoosh.init({ 
    "pw_appid" : "YOUR_PUSHWOOSH_PROJECT_ID" , 
    "project_number" : "YOUR_GCM_PROJECT_NUMBER",
    "pw_notification_handling" : "CUSTOM"
});
Pushwoosh.register();

In order to use reverse proxy to connect to pushwoosh servers specify the parameter "reverse_proxy_url" with the url to your reverse proxy when initializing the plugin:

import Pushwoosh from 'pushwoosh-react-native-plugin';

Pushwoosh.init({ 
    "pw_appid" : "YOUR_PUSHWOOSH_PROJECT_ID" , 
    "project_number" : "YOUR_GCM_PROJECT_NUMBER",
    "reverse_proxy_url" : "URL_TO_YOUR_REVERSE_PROXY"
});
Pushwoosh.register();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.