Git Product home page Git Product logo

pushnotification-demoapp's Introduction

Advanced Push Notifications Sample App for PhoneGap/Cordova

Try in AppBuilder

Overview

This repository contains a sample app that demonstrates how to implement more advanced features relating to push notifications. It is a hybrid app built using Telerik Platform and Cordova.

The sample app showcases these features:

  • Users management
  • Enabling a device for push notifications
  • Registering devices with a userId field
  • Creating push notifications from the client app
  • Targeting push notifications to specific users

The sample app utilizes the following Telerik products and SDKs:

Screenshots

Login Screen Registering Select Recipient Receiving
Login Screen Registering Select Recipient Receiving

Requirements

Before you begin, you need to ensure that you have the following:

  • An active Telerik Platform account Ensure that you can log in to a Telerik Platform account. This can be a free trial account. To send a notification to a subset of users you will need a subscription plan that supports "Push to Segment".
  • Telerik AppBuilder The sample app requires Telerik AppBuilder to run. This can be the in-browser client, the desktop client or the extension for Visual Studio.

Configuration

The sample app comes fully functional, but to see it in action you must link it to a Telerik Platform app.

  1. Click the Run in the Platform button to clone the repository in Telerik Platform.
    A new Telerik Platform app is created for you. You can view the app source code on the Code tab.
  2. Click the Data tab and then click Enable Data.
  3. Click the Settings tab.
  4. Take note of your App ID.
  5. Go back to Code.
  6. Open the backend-services-push-hybrid-advanced/scripts/config.js file.
  7. Locate the app.config.everlive.appId variable and replace its value with the App ID that you acquired earlier.
  8. If you want to run the app on Android devices, locate the app.androidProjectNumber variable and replace its value with your Google project number. More details on obtaining the project number can be found on Google Developers.
  9. Go to the Notifications tab and click Enable Notifications.
  10. Enable push notifications as explained in Enabling Push Notifications.
  11. Ensure that the Notifications > Push Notifications > Permissions > Client Push Notifications setting is set to Allow or Limit.

It is not advisable to set Client Push Notifications to Allow on productions apps. For more information, see Security of Push Notifications.

Running the Sample

Once the app is configured, you can run it on a real device. To run it, follow the steps in the product's documentation: Running Apps on Devices.

When running the app, ensure that you are building it as an app package as opposed to an AppBuilder companion app package.

Receiving push notifications are not supported when running the app on device simulators/emulators or in the AppBuilder companion app. The rest of the app features will work though.

Ensure that the device that you are using has Internet connectivity when running the sample.

pushnotification-demoapp's People

Contributors

eddyverbruggen avatar antondobrev avatar stoyanvi avatar

Watchers

James Cloos avatar Narek Harutyunyan avatar

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.