Push notification delivered twice when the delay to next notif is around 1-10min ish

i have the push notification problem being delivered twice . it occurs when i publish notification for example at 11 am, its working normal. but when i publish another message in the next some minutes(dont know exactly until what minutes, but i input is next 2-3 minutes) that notification being sent twice. but if i wait quite long time to publish another notification(not exactly sure until what minute) its delivered only once.
so here is the code, im using custom for adding sound on notification,
public class MyReceiver extends BackendlessBroadcastReceiver {
public Class<? extends BackendlessPushService> getServiceClass()
return MyService.class;
public class MyService extends BackendlessPushService {
public void onRegistered(Context context, String registrationId )
//Toast.makeText( context, “registered” + registrationId, Toast.LENGTH_SHORT).show();
public void onUnregistered( Context context, Boolean unregistered )
//Toast.makeText( context, “unregistered”, Toast.LENGTH_SHORT).show();
public boolean onMessage( Context context, Intent intent )
//String message = intent.getStringExtra( “message” );
CharSequence tickerText = intent.getStringExtra( PublishOptions.ANDROID_TICKER_TEXT_TAG );
CharSequence contentTitle = intent.getStringExtra( PublishOptions.ANDROID_CONTENT_TITLE_TAG );
CharSequence contentText = intent.getStringExtra( PublishOptions.ANDROID_CONTENT_TEXT_TAG );
String message = intent.getStringExtra( PublishOptions.MESSAGE_TAG );
android.support.v4.app.NotificationCompat.Builder mBuilder =
new android.support.v4.app.NotificationCompat.Builder(context)
NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(1, mBuilder.build());
Log.v(“ticker value”,String.valueOf(tickerText)+"\n"+String.valueOf(contentTitle)+"\n"+String.valueOf(contentText));
return true;
public void onError( Context context, String message )
Toast.makeText( context, message, Toast.LENGTH_SHORT).show();
Manifest.xml: https://gist.github.com/anonymous/efabaecfe775cffc5c12bf53eaaf35dc

class that publish notiftication :
PublishOptions publishOptions = new PublishOptions();
publishOptions.putHeader( “android-ticker-text”, “You just got a notification!” );
publishOptions.putHeader( “android-content-title”, title );
publishOptions.putHeader( “android-content-text”, content );

DeliveryOptions deliveryOptions = new DeliveryOptions();
Date publishDate = expireDate;
deliveryOptions.setPublishAt( publishDate );
Backendless.Messaging.publish((Object)“tes”, publishOptions, deliveryOptions, new AsyncCallback<MessageStatus>() {
public void handleResponse(MessageStatus response) {
Log.v(“Status success”,"sukses, messageId = "+messageId);

public void handleFault(BackendlessFault fault) {
Log.v(“Status fail”,fault.getMessage());

Is it the first notification coming twice or the second one? Also, please provide your application ID.

its the second notification, first notification working fine

app id : 7ED10098-C113-C7B1-FF0F-65BAA6D62800

Have you checked whether the same behavior is observed when you don’t override BackendlessPushService?

hey what u mean is using default backendless receiver n service? i change manifest to original like this:


<category android:name=“com.example.vayne.snapit”/>
<service android:name=“com.backendless.push.BackendlessPushService” />and the bug doesnt show. is there any wrong code i put on custom push?

OK, so it seems there’s no bug in Android SDK. In this case, can you please prepare a sample application which reproduces the problem and which we can just launch without much setting up?

hey sergey here is the sample app, i dont know why but now even first push notification already delivered twice

Sample.rar (21.67MB)

Thanks for the sample!
Internal task BKNDLSS-13281 has been created to investigate the issue. We shall notify you here as soon as we have any news.

hey sergey is there any update?


The task is still in progress.

In your Receiver’s onMessage() handler you need to return false in case you show the notification by yourself. If you leave “return true;”, the notification will be displayed automatically by Android SDK, that’s why you were receiving a duplicate.

We shall also add this information to the documentation. Thank you for help in investigating!

ty sergey, that solve the problem!