How to use backendless - 6 common examples

To help you get started, we’ve selected a few backendless examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Backendless / JS-SDK / examples / messaging-service / push-notification / ionic-2 / src / app / app.component.ts View on Github external
/// 

import {Component} from '@angular/core';
import {Platform, AlertController} from "ionic-angular";
import {StatusBar, Push, Splashscreen, Device} from "ionic-native";

import {HomePage} from '../pages/home/home';


import Backendless from "backendless";

const APP_ID: string = 'YOUR_APPLICATION_ID';
const APP_KEY: string = 'YOUR_APPLICATION_KEY';

Backendless.initApp(APP_ID, APP_KEY);

@Component({
  templateUrl: 'app.html'
})
export class MyApp {
  rootPage = HomePage;

  constructor(public platform: Platform,
              public alertCtrl: AlertController) {
    platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      StatusBar.styleDefault();
      Splashscreen.hide();

      this.initPushNotification();
github Backendless / JS-SDK / examples / messaging-service / push-notification / react-native / app.js View on Github external
AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';

import PushNotification from 'react-native-push-notification';

import DeviceInfo from 'react-native-device-info';

import Backendless from 'backendless';

const APP_ID = 'YOUR_APPLICATION_ID';
const APP_KEY = 'YOUR_APPLICATION_KEY';

Backendless.initApp(APP_ID, APP_KEY);

PushNotification.configure({

  // (optional) Called when Token is generated (iOS and Android)
  onRegister: function(device) {
    Backendless.setupDevice({
      uuid    : DeviceInfo.getUniqueID(),
      platform: device.os,
      version : DeviceInfo.getSystemVersion()
    });

    Backendless.Messaging.registerDevice(device.token).then(
      function() {
        alert("Registration done");
      },
      function() {
github Backendless / JS-SDK / examples / messaging-service / push-notification / ionic-2 / src / app / app.component.ts View on Github external
initPushNotification() {
    if (!this.platform.is('cordova')) {
      console.warn("Push notifications not initialized. Cordova is not available - Run in physical device");
      return;
    }

    Backendless.setupDevice({
      uuid: Device.uuid,
      platform: Device.platform,
      version: Device.version
    });

    let push = Push.init({
      android: {
        senderID: "YOUR_SENDER_ID"
      },
      ios: {
        alert: "true",
        badge: false,
        sound: "true"
      },
      windows: {}
    });
github Backendless / JS-SDK / examples / messaging-service / push-notification / react-native / app.js View on Github external
onRegister: function(device) {
    Backendless.setupDevice({
      uuid    : DeviceInfo.getUniqueID(),
      platform: device.os,
      version : DeviceInfo.getSystemVersion()
    });

    Backendless.Messaging.registerDevice(device.token).then(
      function() {
        alert("Registration done");
      },
      function() {
        alert("Oops. Something went wrong");
      }
    );
  },
github Backendless / JS-SDK / examples / messaging-service / push-notification / ionic-2 / src / app / app.component.ts View on Github external
push.on('registration', (data) => {
      Backendless.Messaging.registerDevice(data.registrationId).then(
        function () {
          alert("Registration done");
        },
        function() {
          alert("Oops. Something went wrong");
        }
      );
    });
github Backendless / JS-SDK / examples / messaging-service / push-notification / react-native / app.js View on Github external
onRegister: function(device) {
    Backendless.setupDevice({
      uuid    : DeviceInfo.getUniqueID(),
      platform: device.os,
      version : DeviceInfo.getSystemVersion()
    });

    Backendless.Messaging.registerDevice(device.token).then(
      function() {
        alert("Registration done");
      },
      function() {
        alert("Oops. Something went wrong");
      }
    );
  },

backendless

Backendless JavaScript SDK for Node.js and the browser

ISC
Latest version published 29 days ago

Package Health Score

73 / 100
Full package analysis