-1

I want to make an app where one user can ask for help and all other using this app will get that notification. I am using Parse.com for this as server. i am totally new to this please help me.I got registered my device by key etc. now i can send push notification from parse.com to my device.

but don't know how to make this on my device to send this to other devices?

GulZaib Amjed
  • 81
  • 1
  • 6
  • 1
    Welcome to SO! This question is too broad to answer here, please get started on your own, then come back with a more specific question. This question may be a good place to start http://stackoverflow.com/questions/1378671/push-notifications-in-android-platform – Will Aug 07 '15 at 20:48

1 Answers1

0

You can create subscribe devices to different unique channel names, then you can send notification containing required payload to the device using the channel to which other device is subscribed.

//subscribing to channel

ParsePush.subscribeInBackground("Channel_Name"); 

//getting installed devices
ParseQuery pushQuery = ParseInstallation.getQuery();
//query for getting devices with channel name
pushQuery.whereEqualTo("channels", "Channel_Name"); 

ParsePush push = new ParsePush();
push.setQuery(pushQuery);
push.setMessage("Your message payload");
push.sendInBackground();

You can subscribe multiple devices to same channel, but in this case when notification is send , it will be sent to all devices subscribed to a particular channel.

For more info: https://parse.com/docs/android/guide#push-notifications

Aakash
  • 5,181
  • 5
  • 20
  • 37