Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send push with parse to certain device?

I've just gone through this (very good) tutorial: https://parse.com/tutorials/ios-push-notifications and only one question is left. Can I send a push-message within my app to only one certain device (probably with the device token?) instead of to every device? I don't necessarily need to know how now, a simple "yes, that's possible with parse" or "no, you can't use parse for that" will be enough!

Cheers

like image 806
Philip Avatar asked Feb 20 '26 14:02

Philip


1 Answers

You can save a device id in ParseInstallation and then target this installation:

Receiver:

ParseInstallation installation = ParseInstallation.getCurrentInstallation();
installation.put("device_id", "1234567890");
installation.saveInBackground();

Sender:

ParseQuery query = ParseInstallation.getQuery(); 
query.whereEqualTo("device_id", "1234567890");    
ParsePush push = new ParsePush();
push.setQuery(query);
push.sendPushInBackground();
like image 144
makovkastar Avatar answered Feb 22 '26 04:02

makovkastar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!