Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

Sending push notification with segmentation

$
0
0

@eldy wrote:

Not sure I'm doing it correctly or not, I put an ajax call in ionic.run to save the device token once it's registered to my db. like this

push.register(function(token) {

  $http({
    method: 'POST',
    url: config.hostname + '/api/token/save',
    skipAuthorization: true,
    headers: {
      'owner': config.owner
      },
      data: {token:token}
  }).then(function successCallback(response) {
      console.log("response:",response);
  })


  push.saveToken(token);  // persist the token in the Ionic Platform
});

Then in my dashboard I will use those saved token and send to ionic.io, but I have one doubt. How to avoid sending those device token which has already inactive. Like u have 1000 download and got 1000 device token, but the active user is only around 100, u wouldn't want send 1000 right?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>