Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

send push notification with parse to single device

Can I send a push-message within my android app to only one certain device (probably with the device id ?) instead of to every device?
a simple "yes, that's possible with parse" or "no, you can't use parse for that" will be enough! if ans is yes then I need to know how.....

like image 915
param Avatar asked Mar 20 '14 12:03

param


People also ask

What is smart push notification?

Push notifications are text or rich media messages sent to mobile devices from third-party applications. If you're reading this on your phone, it's likely that you've recently come across a push notification or two. Push notifications offer value in multiple ways for both mobile marketers and smartphone users.


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 93
makovkastar Avatar answered Nov 08 '22 20:11

makovkastar