Questions tagged [chrome-gcm]

Google Cloud Messaging for Chrome (GCM) is a service for signed-in Chrome users that helps developers send message data from servers to their Chrome apps and extensions.

Google Cloud Messaging for Chrome (GCM) is a service for signed-in Chrome users that helps developers send message data from servers to their Chrome apps and extensions. The service is intended to wake up an app or extension, and/or alert a user. For example, calendar updates could be pushed to users even when their calendaring app isn't open.

The service handles all aspects of queueing and delivering messages. To use the service, you must agree to the Google Cloud Messaging for Chrome API Terms of Service.

Messages must conform to these constraints:

Maximum payload length: 256 bytes

Maximum subchannels: 4

Maximum API requests per day: 10,000

Google API client libraries

You may use the REST interface defined here to access Google Cloud Messaging for Chrome from your application. We also offer Google API client libraries for a number of popular programming languages that can be used to access the API. For more information, see Google APIs Client Libraries.

Insert method

The gcm_for_chrome.messages.insert method sends a message to your app or extension user.

Authentication

Authentication is required to send messages to users. Using OAuth 2.0 for Web Server Applications describes this in greater detail.

URL

The URL used to obtain access to the GCM for Chrome service: https://accounts.google.com/o/auth2/auth.

78 questions
1
vote
2 answers

Ionic Android Push Notification getting error on phonegap-plugin-push

I am using Ubuntu(15.10) 64-bit system and I use chrome for my logs. I am trying to do android push notification and http://docs.ionic.io/v1.0/docs/push-from-scratch# using this ionic doc i am trying to do push notification. when try to install…
user6112636
1
vote
0 answers

PushManager endpoint contains "undefined"

While using the serviceWorkerRegistration.pushManager.subscribe method from a ServiceWorker, the created endpoint sometimes contains an "/undefined" at the end of the string. For example, through a Chrome ServiceWorker :…
Arturo
  • 213
  • 1
  • 3
  • 12
1
vote
1 answer

Update dynamic data in service-worker.js

I have the below data coming in form of array from a url. [{"title":"hey hi","body":"hello","url":"https://simple-push-demo.appspot.com/","tag":"new"}] service-worker.js it has the above url in fetch() 'use strict'; console.log('Started',…
trupti
  • 413
  • 1
  • 6
  • 11
1
vote
2 answers

How to implement service worker?

I have already been through different blogs explaning about service worker , one of them is open Web Push notification. I followed the instructions in Open Web Push notification and implemented a code which creates a curl registration id.Once the…
trupti
  • 413
  • 1
  • 6
  • 11
1
vote
2 answers

Open Chrome Web App using GCM

I am able to send a message to a Chrome Web App using GCM. I am using a http post to: https://android.googleapis.com/gcm/send sending registrationid, applicationid, and senderid values. The message shows as a Chrome Notification on my screen. …
obautista
  • 3,517
  • 13
  • 48
  • 83
1
vote
1 answer

Google Cloud Messaging for Chrome Web Push Notifications Issues

All of my questions are in context of Chrome Web Push Notifications, as released in Chrome Version 42. 1) GCM API returns 'Success' for even those Registration IDs which are no longer valid. When a person right clicks on the notification, and clicks…
1
vote
1 answer

Google cloud messaging Error 500 (Internal Server Error)

Google Cloud Messaging Call from PHP. I have searched a lot with the error code many people are saying in case of application uninstalled you can get this error. But in my case application not been uninstalled. I am tying to send push notification…
A J
  • 4,542
  • 5
  • 50
  • 80
1
vote
2 answers

Why does ServiceWorkerRegistration callback is not hitting after the successful registration of service worker?

I am using the below script to register service worker, and would like to Check if this service worker supports push? Just for testing purpose I am printing 'Print Service worker', but it is not getting printed to console. Kindly help me to…
17CrazyBrain
  • 63
  • 3
  • 13
1
vote
2 answers

Send Push Notification to everyone with Service Worker

curl --header "Authorization: key=blahblahblah" --header Content-Type:"application/json" https://android.googleapis.com/gcm/send -d "{\"registration_ids\":[\"blahblahblah\"]}" Currently i am able to send push notification though the command above.…
Henry Lim
  • 13
  • 1
  • 5
1
vote
1 answer

Google Cloud Messaging in dart

I'm trying to connect to the Google Cloud Messaging with this code in dart senderIds.add("api-project-testid"); chrome.gcm.register(senderIds).then(registerCallback); but I have this error: Exception: Uncaught Error: Profile was not signed…
MalumaDev
  • 161
  • 2
  • 17
1
vote
1 answer

Compress json string for gcm push notification message

I have problem with json data and gcm push notification. I send big json data and it exceed 4kb limit, so is there any compression that i can use to compress that json(gzip or something like that) and send it?
Mirza Delic
  • 4,119
  • 12
  • 55
  • 86
1
vote
0 answers

Google Cloud Messaging for Chrome - Multiple messages

I am currently working on a Chrome extension which uses the chrome.pushMessaging API provided by Chrome. I register push messaging callback in the background page of the…
1
vote
0 answers

Seeing error 500 when trying to enable Google Cloud Messaging for Chrome from the Google API console

From the Google API Console, when I try to enable the Google Cloud Messaging for Chrome API, I see a 500 error in the javascript console: POST…
rhuff
  • 722
  • 2
  • 8
  • 14
1
vote
2 answers

Chrome App pushMessaging does not work when background page is inactive

manifest.json: { "app": { "background": { "scripts": [ "background.js" ] } }, "key": "...", "manifest_version": 2, "name": "Push Sample", "permissions": [ "notifications", "pushMessaging" ], "version":…
Marc Rochkind
  • 3,678
  • 3
  • 30
  • 38
1
vote
1 answer

Google Cloud Messaging for Chrome channelId unique per device?

Suppose I have my extension installed on two computers, and I am logged into both with the same google account. Will chrome.pushMessaging.getChannelId return the same value for both computers? Is there any way to request that each individual install…
kzahel
  • 2,765
  • 1
  • 22
  • 31