Stop notifications from displaying in a popup

441 views Asked by At

I am writing an Android App that is designed to perform a task over a period of time.

I have created a layout with a ProgressBar to indicate in the status how far through the process it is.

The problem I face is that in the Android Documentation it says:

mNotificationManager.notify(CUSTOM_VIEW_ID, notification);

As the code used to create / update your Notification. This is fine to an extent, the Notification updates itself with the new values for the progress bar that I have set. The problem is that every time I create an update Android spawns a new popup display telling me that I have an update (Android 3.1.1). This means that throughout the whole process I cannot open the status section.

TL;DR: The main part of this question, is to ask how I can get the Notification to stop creating a popup every time it is updated.

1

There are 1 answers

0
Knossos On BEST ANSWER

It seems that this problem was caused by not using this flag:

Notification.FLAG_ONLY_ALERT_ONCE