Push Notification query channel within rest service

This forum contains topics that were moved from Get Satisfaction
Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Push Notification query channel within rest service

Post 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

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Push Notification query channel within rest service

Post 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....

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Push Notification query channel within rest service

Post 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"; ;

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Push Notification query channel within rest service

Post 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

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Push Notification query channel within rest service

Post 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?

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Push Notification query channel within rest service

Post 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":[]}}

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Push Notification query channel within rest service

Post 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

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Push Notification query channel within rest service

Post by Vinny B »

Hello

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Push Notification query channel within rest service

Post 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.

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Push Notification query channel within rest service

Post 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

Post Reply