Sunday 15 September 2013

How to call android GCM from meteor -


I want to use Android GCM in my Android infrastructure.

I have seen but this is an NPM, I do not know that it can be used in the meteor.

Thanks for any indication.

I have created a package that can use it I still have a chance to put it on the environment have not received. (Here's the Dropbox :)

You can use gcm as your server-side javascript code anywhere.

for example)

  var message = new gcm message (); Var message = new gcm.Message ({collapseKey: 'demo', delay time: true, time tolllive: 3, data: {key1: 'message1',}}); Var sender = new gcm.edender ('insert Google server API key here'); Var registration IDS = []; RegistrationIds.push ('regId2'); Sender.send (Message, Registration ID, 4, Function (fault, result) {console.log (results);}); You need to interface it with  Meteor.call     to call the   

client

No comments:

Post a Comment