Multiple notifications, single icon on notification bar?

by Mark Wyszomierski » Fri, 04 Jun 2010 06:30:39 GMT

Sponsored Links

If I do:

   for (int i = 0; i < 3; i++) {
       NotificationManager.notify(i, notification);

I'll get three notification icons on the notification bar, and three
list items in the pull down. Is there a way to use only one icon on
the notification bar, but still keep three entries in the pull down? I
tried doing:

   for (int i = 0; i < 3; i++) {
       if (i > 0) {
           notification.number = -1;
       NotificationManager.notify(i, notification);

but no luck. The docs say that setting notification.number to zero or
a negative # will prevent it from showing up on the notifications bar,



Multiple notifications, single icon on notification bar?

by TreKing » Fri, 04 Jun 2010 08:52:03 GMT


Don't think so - each icon represents an entry in the pull down - having one
icon represent multiple entries wouldn't really make sense.

This prevents the number that's overlayed on the icon from showing up, not
the icon itself.

TreKing - Chicago transit tracking app for Android-powered devices 


Sponsored Links

Multiple notifications, single icon on notification bar?

by Zsolt Vasvari » Fri, 04 Jun 2010 14:34:23 GMT

 Can't you do what GMail does and shows the # of items in parantheses?


Multiple notifications, single icon on notification bar?

by Frank Weiss » Mon, 07 Jun 2010 09:39:25 GMT


Can't you do what GMail does and shows the # of items in parantheses?


Other Threads

1. ant build error while importing third-party library

When I put a third-party jar into /lib folder, then build it with ant, the
error shows. Also the error goes off if the library is removed.

     [echo] Converting compiled files and external libraries into
    [apply] java.lang.OutOfMemoryError: Java heap space
    [apply]     at java.util.ArrayList.<init>(Unknown Source)
    [apply]     at java.util.ArrayList.<init>(Unknown Source)
    [apply]     at$1.proc


2. "no such table..." message error in my android applications

I'm an italian android application publisher.
In my free and paid applications, i use database files.
I have database file with extension ".sqlite". I change this extension
in ".db".
I add the table "android_metadata" with the command CREATE TABLE
"android_metadata" ("locale" TEXT DEFAULT 'en_US') and then I add a
single row
in this table with the command INSERT INTO "android_metadata" VALUES
After these changes, I put the database files in my application assets
At the first use of the application, i copy these database files in
the filesystem device, in the folder "/data/data/myapp/databases/".
This is the java code of the function that i use to copy file from
assets folder to filesystem device:

    private void copyDataBase(String dbpath, String dbname) throws
IOException {
        InputStream myInput = myContext.getAssets().open(dbname);
        String outFileName = dbpath + dbname;
        OutputStream myOutput = new FileOutputStream(outFileName);

        byte[] buffer = new byte[1024];
        int length;
        while ((length =>0){
                myOutput.write(buffer, 0, length);


I try my application with Acer beTouch E400 (Android 2.1), HTC
Wildfire (Android 2.1) and Samsung GalaxyTab (Android 2.2) and i don't
have problems or errors (I prepare my application with target Android
2.2 and MinSDKVersion=4).
In the last fif{*filter*} days, i have received, in the application android
control panel, an error notice and 9 reports for the free application
(900 downloads) and an errore notice and 2 reports for the paid
applications (60 downloads).
The stack trace is the same: "android.database.sqlite.SQLiteException:
no such table: tabella, while compiling: SELECT....";
I think that the database file is in the filesystem device, but it is
damaged. The free application has received also many beautiful
comments and the same user buy many paid applications: so they work
correctly... i don't understand
How can i solve this problem? Are there some errors in my java code?
Can this kind of error depend from Android Market temporary download
problems or Android version or Android system update or kind of
Thanks and sorry for my english...


3. [MediaPlayer] seekTo behavior after onBufferingComplete

4. writing an Authenticator to use with AccountManager

5. Emulator too slow to start - ADT 8.0.1, Ubuntu 10.10, Eclipse 3.5.2

6. Version code being displayed instead of Version Name in Samsung Galaxy S - GT I9000 device?

7. mau bertanya,,