GCM can be done with Parse.com - but it is much harder than with iOS - Parse just do some dumb things - like forcing you to use there GCM service.
Basically you need to use their REST api to add your devices to the installation parse class.
something like this - I add a deviceType column so we can pick out the GCM devices for our push later.
// Rest call to Parse to Insert/Update the Installation record for this Device
$http({
url: "https://api.parse.com/1/installations",
method: "POST",
data: {"deviceType": "android",
"installationId": CommonService.parseInstallationId,
"gcmRegId": e.regid,
"testdevice": tester,
"channels": [""] },
headers: {"X-Parse-Application-Id": CommonService.parse_appkey,
"X-Parse-REST-API-Key": CommonService.parse_restkey,
"Content-Type": "application/json"}
}).success(function (data, status, headers, config) {
LogService.add("GCM RegID: " + e.regid);
LogService.add("GCM Parse InstallationID: " + CommonService.parseInstallationId);
//alert('GCM registered success = ' + data + ' Status ' + status);
}).error(function (data, status, headers, config) {
//alert('GCM registered failure = ' + data + ' Status ' + status);
});
then you need to write your our ‘Push Console’ (I have a Dashboard for my apps that is used for many things including the Pushes.
You need to add a Parse Cloud function then that you can call (mine called GCMPush) - this functions basically looks up the installation class for deviceType = GCM and then calls the google GCM API directly (using your GCM-API-KEY) to send the push - bit long winded but it has worked well for me for over a year now.
the call is something like this
Parse.Cloud.httpRequest({
method: 'POST',
url: 'https://android.googleapis.com/gcm/send',
headers: {
'Authorization': 'key=' + GCM_API_KEY,
'Content-Type': 'application/json'
},
body: {
registration_ids: gcmRegIds,
data: {
"message": message
}
},
success: function(httpResponse) {
// Do something
console.log('GCM Push Successful');
response.success({"msg":"gcm Push Successful","count":gcmRegIds.length});
},
error: function(httpResponse) {
console.error('GCM Request failed ' + JSON.stringify(httpResponse));
response.error({"msg":"gcm Push Failed"});
}
Hope this gets you to the next step
cheers