Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

MobileChromeApps/cordova-plugin-chrome-apps-pushMessaging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chrome Push Messaging Plugin

This plugin allows apps to receive push messages.

Status

  • Supported on iOS.
  • Deprecated on Android (use chrome.gcm instead)

Reference

The API reference is here.

Notes

  • chrome.pushMessaging.getChannelId returns an object containing a channelId, a registrationId and a deviceToken. The channelId is used for sending push messagings to instances of the app running on desktop; the registrationId is used for sending push messages to instances of the app running on Android; the deviceToken is used to send messages to instances of the app on iOS devices.
  • On Android, chrome.identity must be modified so that getAuthToken uses the javascript flow (getAuthTokenJS) instead of the native exec flow. Otherwise getChannelId will fail to obtain a channelId (but will still obtain a registrationId).
  • On iOS the token is not application specific, but the messaging system requires a certificate that identifies the application.
  • You must install an appropriate auth2 section in your manifest.json with suitable client_id and scopes. Push Messaging requires the scopes: https://www.googleapis.com/auth/gcm_for_chrome and https://www.googleapis.com/auth/gcm_for_chrome.readonly

Release Notes

1.1.1 (April 30, 2015)

  • Renamed plugin to pubilsh to NPM

1.1.0 (Mar 17, 2015)

  • Refactor chrome.pushMessaging to work under CSP - Use message queue for native -> JS events
  • Fix race conditions causing onLaunched not to fire

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •