Page 1 of 2

Push Notification query channel within rest service

Posted: Tue Oct 27, 2015 11:42 pm
by Vinny B

Hello

From within my app I am sending push notifications. My users have select multiple channels.

User 1 - Channel 3
User 2 - Channel 1,2
User 3 - Channel 2

I want to be able to send a push to users who have selected channel 1 or channel 3 - so in my example user 1 and user 2 would receive a push notification.

From within the app I can select two channel Here is my code.
Image


Push Notification query channel within rest service

Posted: Wed Oct 28, 2015 2:07 am
by Vinny B

I want to push to two different channels at the same time. I want users on channel 1 and users in channel 2 to receive the push notification. Then i want to send a puch just to users on channel 1 then I want to send a push to users on channel 2 and 3. etc....


Push Notification query channel within rest service

Posted: Wed Oct 28, 2015 2:39 am
by Vinny B

I believe my issue is with my javascript. So maybe I can explain myself better

if I type in return "2","9"; ;


Push Notification query channel within rest service

Posted: Wed Oct 28, 2015 11:36 am
by Vinny B

how do I query channels from within my apps Rest service when I am sending a push notification from my app? Image Image


Push Notification query channel within rest service

Posted: Wed Oct 28, 2015 2:42 pm
by Serhii Kulibaba

Hello Vinny,

I am sorry, not sure I understand you correctly. Please specify your question. Do you need to change a channel for current device?


Push Notification query channel within rest service

Posted: Wed Oct 28, 2015 7:02 pm
by Vinny B

Push notifications channels

["1","2","3","4"]

User SMITH ["2"]
User JOHN ["3"]
User ACE ["2","4"]

I want to send a push notification from within the app using REST API to channels 2 and 3.

So in the above example ALL users would receive the notification.

Or I can send it to channel 2 which only SMITH and ACE would receive the notification.

I need to use the query with the rest api {"channels":{"$in":["1","4"]},"type":{"$in":[]}}


Push Notification query channel within rest service

Posted: Thu Oct 29, 2015 4:06 pm
by Vinny B

Does support have any idea on this topic. I need to send a push notification to two different channels. My users can select multiple channels. I know I am probably not explaining myself well but I will try better.

I need to send a push to channel 1 and channel 9 at the same time.

Here is my database
Image


Push Notification query channel within rest service

Posted: Fri Oct 30, 2015 12:37 am
by Vinny B

Hello


Push Notification query channel within rest service

Posted: Fri Oct 30, 2015 6:00 am
by Yurii Orishchuk

Hi Vinny,

At first, please get to work filter based only on "channels". Then you can complicate it step-by-step.

Please configure your "sendPush" service like on following screenshot:

http://prntscr.com/8wwrc0/direct

Regards.


Push Notification query channel within rest service

Posted: Fri Oct 30, 2015 10:08 pm
by Vinny B

Thank you Yuri!!
My problem is my app is live with over 1000 downloads and I get two or three more every day. I have been trying everything but sometimes I send out a push on accident to everyone.

I did what you said, that but I am not sure if my mapping is correct.

Is my javascript correct?

The value saved in local storage is 1,2 Image

Image