From ced14a385a8606319e5d7d604f65c7a33c8e1476 Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Sun, 18 Oct 2015 20:27:36 -0400 Subject: switched to new push plugin that works with JSON payloads --- plugins/phonegap-plugin-push/example/server/pushGCM.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/phonegap-plugin-push/example/server/pushGCM.rb (limited to 'plugins/phonegap-plugin-push/example/server/pushGCM.rb') diff --git a/plugins/phonegap-plugin-push/example/server/pushGCM.rb b/plugins/phonegap-plugin-push/example/server/pushGCM.rb new file mode 100644 index 00000000..e1efce5e --- /dev/null +++ b/plugins/phonegap-plugin-push/example/server/pushGCM.rb @@ -0,0 +1,9 @@ +require 'rubygems' +require 'pushmeup' +GCM.host = 'https://android.googleapis.com/gcm/send' +GCM.format = :json +GCM.key = "API_KEY_GOES_HERE" +destination = ["REGISTRATION_ID_GOES_HERE"] +data = {:message => "PhoneGap Build rocks!", :msgcnt => "1", :soundname => "beep.wav"} + +GCM.send_notification( destination, data) -- cgit v1.2.3