npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

megaplan-plugin-push

v2.5.11

Published

## Description

Downloads

11

Readme

Telerik Push Notifications Plugin

Description

The Telerik Push Notifications is based on the Phonegap Push Plugin.

It contains some bug fixes and new features and is easily integrated with Telerik Backend Services.

Using with Telerik Backend Services

In order to use the plugin with Telerik Backend Services, which supports iOS, Android, WP8 and Windows 8, take a look at the official documentation:

For further information you can take a look into the Backend Services hybrid push notifications samples:

Features

  • Register a device for push notifications

       var deviceSpecificOptions = { ... }; // set the device specific options here
       pushNotification.register(successHandler, errorHandler, deviceSpecificOptions);
  • Unregister a device from push notifications

      pushNotification.unregister(successHandler, errorHandler, options);
    
    	
  • iOS 8 interactive push notifications support (available from v2.5 and above)

      // Get the push plugin instance
      var pushPlugin = window.plugins.pushNotification;
    
      // Define a new Read Action
    	var readAction = {
      	identifier: 'READ_IDENTIFIER', // mandatory
      	title: 'Read', // mandatory
      	activationMode: pushPlugin.UserNotificationActivationMode.Foreground, // default: Background
      	destructive: false, // default: false
      	authenticationRequired: true // default: false
    	};
    
    	// Define a new Ignore Action. Defaults are commented out
    	var ignoreAction = {
          identifier: 'IGNORE_IDENTIFIER',
      	title: 'Ignore'
      	//activationMode: pushPlugin.UserNotificationActivationMode.Background,
      	//destructive: false,
      	//authenticationRequired: false
    	};
    
    	// Define a new Delete Action. Defaults are commented out.
    	var deleteAction = {
          identifier: 'DELETE_IDENTIFIER',
      	title: 'Delete',
      	//activationMode: pushPlugin.UserNotificationActivationMode.Background,
      	destructive: true,
      	authenticationRequired: true
    	};
    
      // Define a read category with default and minimal context actions
    	var readCategory = {
      	identifier: 'READ_CATEGORY', // mandatory
      	actionsForDefaultContext: [readAction, ignoreAction, deleteAction], // mandatory
      	actionsForMinimalContext: [readAction, deleteAction]  // mandatory
    	};
    
      // Define another category, with different set of actions
    	var otherCategory = {
          identifier: 'OTHER_CATEGORY', // mandatory
      	actionsForDefaultContext: [ignoreAction, deleteAction], // mandatory
      	actionsForMinimalContext: [deleteAction]  // mandatory
    	};
    
      // Register the category and the other interactive settings.
    	pushPlugin.registerUserNotificationSettings(
        	// the success callback which will immediately return (APNs is not contacted for this)
        	onUserNotificationSettingsReady,
        	// called in case the configuration is incorrect
        	errorHandler,
        	{
          		// asking permission for these features
          		types: [
            			pushPlugin.UserNotificationTypes.Alert,
      	      		pushPlugin.UserNotificationTypes.Badge,
                		pushPlugin.UserNotificationTypes.Sound
          		],
          		// register these categories
          		categories: [
            			readCategory,
            			otherCategory
          		]
        	}
    	);
            
  • iOS 9 text input support (available from v3.1 and above)

      // Define a Text Input Action
    	var replyAction = {
      	identifier: 'REPLY_IDENTIFIER',
      	title: 'Reply', 
      	activationMode: window.plugins.pushNotification.UserNotificationActivationMode.Background,
      	destructive: false,
      	authenticationRequired: true,
      behavior: window.plugins.pushNotification.ActionBehavior.TextInput
    	};
  • IMPORTANT: When using interactive iOS push notifications with background activation mode, you must call the following function, once you are done processing the push notification object:

      pushPlugin.notificationProcessed()

This way you'll be able to execute your javascript callback and then notify the operating system to put back your app in background, which is the correct approach to handle such notifications by iOS.

  • Set an application icon badge number (iOS only)

      // sets the application badge to the provided value 
      // if badge === 0 clears out the badge 
      pushNotification.setApplicationIconBadgeNumber(successCallback, errorCallback, badge)
  • Check if the user has disabled push notifications on the device

      // Checks whether Push Notifications are enabled for this Application on the Device 
      pushNotification.areNotificationsEnabled(successCallback, errorCallback, options);
  • Handling multiple notifications on Android devices - Since version 2.4.3 of this plugin, all new notifications are stacked in the notification panel and do not replace previous notifications by default. To change this behavior and control which notifications are replaced and which are not, pass a notId key in the notification payload.

    • To always stack new notifications, don't pass the notId value.

      	"data": {
      		"title": "Hello",
                  "message": "Always stack the notification.", 
      	}
    • To always replace existing notifications, use the same positive (> 0) notId value for all notifications.

      	"data": {
          	"title": "Hello",
              "message": "Always replace the notification.",
              "notId": 1 // send the same notId every time 
      	}
    • If your application supports different kinds of push notifications, you can use a mixed approach based on your business logic. Notifications that are sent with the same notId value are replaced automatically, so only the last one is visible. For the rest of the notifications which should be stacked, just do not send a notId key in the payload.

      	"data": {
      		"title": "Hello",
      		"message": "This notification will be stacked."
      		"notId": 5
      	}
      
      	"data": {
      		"title": "Hello",
      		"message": "This notification will be stacked."
      		"notId": 6
      	}
      
      	"data": {
      		"title": "Hello",
      		"message": "This notification will replace the first one."
      		"notId": 5
      	}

## LICENSE

The MIT License

Copyright (c) 2012 Adobe Systems, inc.
portions Copyright (c) 2012 Olivier Louvignes

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.