Support Topics Documentation Slack YouTube Blog

Message Publish Options : About the Use of setPushSingleCast() function


(Pujan Paudel) #1

Hello Backendless,
I was wondering about the Use of SetPushSingleCast() function in Messaging API . Let’s put a Use case in play here. Suppose I have a Channel A with 1000 Registered Device on the Channel named Device 1 , Device 2 , …Device 1000
When I Publish a Message in the Channel , the Message will be Broadcasted to those 1000 Devices.
But, I want to Achieve Same Thing by Using this type of Code :

List<String>recieversList=new ArrayList<String>();
//recieversList is somehow populated with Valid device Id's 

DeliveryOptions dov=new DeliveryOptions();
dov.setPushSingleCast(recieversList);
Backendless.Messaging.Publish((Object)"Message",publishOptions,dov); 

I was just Wondering if the below Code Would allow me to Achieve the same Using “Default” Channel

Regards,
Pujan Paudel


(Mark Piller) #2

Hi Pujan,

Yes, it would result in the same behavior - the message is delivered to the specific devices identified in the request.

Regards,
Mark