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