Skip to content

pushnotification gcm send

Matthias Görges edited this page Mar 16, 2015 · 1 revision

pushnotification-gcm-send sends a Google Cloud Message to a device.

Parameter Description
apikey API key from Google developer console
token u8vector containing the unique device identifier
msg String to be send
data Optional: Data to be send with message

Example

Example 1: Send the message ABC using Google Cloud Messaging

(define (pushnotification-gcm-test)
  (let ((apikey "ApiKeyYouGotFromGoogleDeveloperConsole")
        (token (string->u8vector "ABC"))
        (message "Test from LN")))
    (display (pushnotification-gcm-send apikey token msg))
 ))
Clone this wiki locally