raix-push icon indicating copy to clipboard operation
raix-push copied to clipboard

Does this package work for push notifications to native iOS and Android apps? (not cordova)

Open kevinpk999 opened this issue 10 years ago • 4 comments

Does this package work for push notifications to native iOS and Android apps? (not cordova)

kevinpk999 avatar Jul 23 '15 08:07 kevinpk999

you would have to connect via ddp and report in the client push id - but if so then yes.

raix avatar Jul 27 '15 10:07 raix

@raix How about push from server to native iOS? I guess it did work just asking to be sure. Because title for this repos is mislead somehow so people keep asking (yeah me too).

Thanks

katopz avatar Aug 19 '15 11:08 katopz

The server uses apples/googles push servers so it should not care to much about the client - that said you need to add the client token on to the server. https://github.com/raix/push/blob/master/lib/server/server.js#L14

You can also create a rest point via the webapp package and have the app hit that, and just:

WebApp.connectHandlers.use('update_token', function(req, res, next) {
  if (req.method === 'POST') {
    // Not sure if we are running in a fiber here, if not then add that
    // Could perhaps just pass in req.query directly to the meteor call...
    Meteor.call('raix:push-update', {
      id: 'myUniqClientId', // If not supplied the server will generate
      token: 'xxxxxxxxxxxxxx',
      appName: 'myNativeApp',
      userId: null,
    });
  } else {
    next();
  }
});

raix avatar Aug 24 '15 06:08 raix

@raix can you please suggest me how to get notification on native android device using this package. As I have installed the package and made appropriate changes but I am not getting notification on my device though it is giving

The "Push.appCollection" is empty - No clients have registred on the server yet... please suggest

prosaquib avatar Jun 08 '18 06:06 prosaquib