Google Cloud Messagingでプッシュ通知を送る

2015-04-21

コマンドラインから送ってみる

デバッグ確認用

curl --header 'Authorization: key=<APIキー>' \
--header Content-Type:"application/json" \
https://android.googleapis.com/gcm/send \
-d '{"registration_ids":["<端末の登録ID>"],"data":{"message":"Hello", "url": "http://www.example.com/"}}'

参照

[改訂版]Google Cloud Messaging (GCM) でプッシュ配信する[Android] | Developers.IO