how to assign channel to Push notification

how can i assign channels os my notifications this is what i tried

PublishOptions publishOptions = new PublishOptions();
publishOptions.putHeader( "android-ticker-text", "You just got a push notification!" );
publishOptions.putHeader( "android-content-title", ""+pevents.getPublisher() );
publishOptions.putHeader( "android-content-text", ""+pevents.getStory() );
DeliveryOptions deliveryOptions = new DeliveryOptions();
ArrayList channelList = new ArrayList();
channelList.add("firstChannel");
channelList.add("secondChannel");
deliveryOptions.setPushSinglecast(channelList);
MessageStatus status = Backendless.Messaging.publish( (Object) pevents.getStory(), publishOptions , deliveryOptions );

but the above code is not working , is there’s something wrong here ?

Hi!

You cannot send notification in multiple channels with a single request.
Please, take a look at documentation about publishing messages: https://backendless.com/documentation/messaging/android/messaging_message_publishing.htm
Note how a channel is passed into the method.
best regards,
Alex

so we have to assign a single channel at a time right ?

Yes, that’s right.