I\'m trying to simulate as if the device is receiving a GCM push message by using adb and the command line. I\'ve tried this command to broadcast a GCM intent:
I suggest using command-line curl, as sending GCM pushes is as easy as calling some REST API. See sample shell script below:
#!/bin/bash
REGISTRATION_ID=YOUR_GCM_REGISTRATION_ID
SERVER_KEY=YOUR_SERVER_KEY_FROM_GOOGLE_API_CONSOLE
curl --header "Authorization: key=$SERVER_KEY" --header Content-Type:"application/json" https://android.googleapis.com/gcm/send -d "{ \"data\" : {\"foo\": \"bar\"}, \"registration_ids\":[\"$REGISTRATION_ID\"] }"