Skip to content

iralution/react-native-parse-notification-android

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-parse-notification-android

A module that help you to manage your device in parse for react-native app with examples and native methods

Prerequisite

  1. Create an account on https://www.parse.com/
  2. Create an app with your account

Install

see the Installation doc

Usage

  • Add the native module to your javascript code
var ParseManagerAndroid = require('NativeModules').NotificationAndroidManager;
  • Then use it like so
ParseManagerAndroid.authenticate((err) => {
  if (err) {
    return console.log('Error while authenticate : ' + err);
  }
  console.log('This device is now register in my app');
});

Methods

Authenticate

  // Authenticate this device as belonging to your application (add it to your Installation Class)
  authenticate((err) => {
    // if no error appears error will be null
  });

SubscribeToChannel

  // Add channel to channels field for the current device (in Installation Class)
  subscribeToChannel(channel, (err) => {
    // if no error appears error will be null
  });

UnsubscribeToChannel

  // Remove channel to channels field for the current device (in Installation Class)
  unsubscribeToChannel(channel, (err) => {
    // if no error appears error will be null
  });

GetId

  // Get the ObjectId field for the current device (in Installation Class)
  getId((id) => {
    // if id not found or error appears id will be null
  });

GetString

  // Get value from field for the current device (in Installation Class) and get
  // it as a String
  getString(field, (err, value) => {
    // if no error appears error will be null
    // if value not found or error appears value will be null or undefined
  });

About

A module that help you to manage your device in parse for react-native app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 69.1%
  • JavaScript 30.9%