push notification not reaching user if published via api in business logic

push notification not reaching user if published via api in business logic whereas if i do it via console it works perfectly

here is my code for publishing push notification

public class OrderTableEventHandler extends com.backendless.servercode.extension.PersistenceExtender<Order>
{

@Override
public void afterCreate( RunnerContext context, Order order, ExecutionResult<Order> result ) throws Exception
{
String applicationID = “FFA75DEF-399D-4898-FFB0-338F81643800”;
String secretKey = “C669FCCF-2F28-E3D1-FF39-655FFC476B00”;
String version = “v1”;
Backendless.initApp( context, applicationID, secretKey, version );

PublishOptions publishOptions = new PublishOptions();
publishOptions.putHeader( "android-ticker-text", "You just got a push notification!" );
publishOptions.putHeader( "android-content-title", "This is a notification title" );
publishOptions.putHeader( "android-content-text", "Push Notifications are cool" );
MessageStatus status = Backendless.Messaging.publish((Object) "Hi Devices!", publishOptions );

}
after trigering this code the message shows up in console uder messages tab but after some time it disappears but never reaches the device

Hi @karanveer,
Please try to set DeliveryOptions. I have just tired to reproduce the issue with following code:
https://gist.github.com/schaffe/e9b8544f0d575531999e8bfbbed596a8
and the pushes were successfully delivered.
Please also check the code on the Android side. Is your device registered to channel?
Cheers, Artur

:frowning: still not working on my end though

worked finally thanks … :slight_smile: