In the Notification class, there is a public field called when. According to the API:
The timestamp for the notification. The icons and expanded views are sorted by this key.
The default behaviour (for code and coders alike :) is to give when the timestamp of the notification:
notification.when = System.currentTimeMillis();
So - in order to maintain the correct order of notifications, all you need to do is give it a preset timestamp instead:
notification.when = previousTimestamp;
When you do this with all of your notifications, they maintain their order. I had the same problem as you and solved it this way.
记录第一次使用的时间戳,每次都使用相同的时间戳就可以了