Display continuous progress bar in notification, Android?

I am trying to display an undefined progress bar in the notification window. But it is not displayed.

This is my code.

                    int id = 1;
                NotificationManager mNotifyManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
                Builder mBuilder = new NotificationCompat.Builder(
                        MenuActivity.this);
                mBuilder.setContentTitle("My app")
                        .setContentText("Download in progress");
                mBuilder.setProgress(0, 0, true);
                // Issues the notification
                mNotifyManager.notify(id, mBuilder.build());

I follow this link Continuous Activity Indicator

Can someone tell me what happened?

+4
source share
1 answer

solved the need to add an icon

.setSmallIcon(R.drawable.ic_notification);
+3
source

All Articles