Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android system notification limit per app

This may be off topic , but I couldn't found anything for it.

Is there any limit on the number of notifications android app can display?I am facing issue after 100 notifications. There is no documentation which states this clearly.

Note: This is not really a good idea to show 100 notifications but It is required for certain reasons.

like image 276
MohK Avatar asked Oct 27 '15 09:10

MohK


People also ask

How do I increase notification count on Android?

If you want to change badge with number, you can be changed in NOTIFICATION SETTING on the notification panel or Settings > Notifications > App icon badges > Select Show with number.

What is Android system notification?

A notification is a message that Android displays outside your app's UI to provide the user with reminders, communication from other people, or other timely information from your app. Users can tap the notification to open your app or take an action directly from the notification.


1 Answers

According to @Nirel's answer.

1) I tried to run the code in 3 different devices.

Surprisingly notifications beyond 50 are not showing in notification area.

It gives following error.

W/NotificationManager﹕ notify: id corrupted: sent 51, got back 0

The same error comes for subsequent calls.

I saw the source of NotificationManager , it gives this error if incoming and out id is not same. See below code.

https://github.com/android/platform_frameworks_base/blob/master/core/java/android/app/NotificationManager.java#L233

2) After I tried to notify on intervals of 100 milliseconds.

It also Gives the same error. What I tried is removed 1 notification when code is executed.

Surprisingly , notification number 153 came in status bar.

So the conclusion is that , at most 50 notifications can be there. This may be default behaviour and may can change by manufacturer as said by @Sharp Edge.

Thnx.

like image 91
MohK Avatar answered Sep 26 '22 01:09

MohK