8

I'm trying to add an android notification to the "tray" in android 3, but I don't want it to "pop up" every time I call notify().

I managed to kind of do this by setting the FLAG_ONLY_ALERT_ONCE flag on the notification, but it will still alert when I set it for the first time.

It seems like this is possible, but I'm not sure how to do this (an example is the Prime ROM for the Asus transformer. When you plug in the dock, a new ongoing notification will be added to the notification area, but there is no alert, or "popup" there.. It just adds another icon to the list quietly. How can I do the same?

1 Answer 1

9

Just set the tickerText to null. You can do this when creating your notification with:

Notification notification = new Notification( R.drawable.icon, null, System.currentTimeMillis());
1
  • Can't believe it was THAT simple! Thanks :) Nov 13, 2011 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.