我想把我的通知放在通知区域的顶部。
一个解决方案是将“when”参数设置为我的通知对象,并将其设置为未来时间,例如:
notification.when = System.currentTimeMills()*2;
我在使用的代码:
long timeNotification = System.currentTimeMillis()*2;
Notification notification = new Notification(statusIcon,c.getResources().getString(R.string.app_name),timeNotification);
notification.flags = Notification.FLAG_ONGOING_EVENT | Notification.FLAG_NO_CLEAR;
notification.when = timeNotification;
notification.priority = Notification.PRIORITY_MAX;
但是某些应用程序(如Facebook)能够在我的通知上方放置一个显示它们当前时间的简单通知。
如果我刷新我的通知,它仍然会在这些通知下面。
我需要设置哪些参数才能将我的Notification
置于通知区域的顶部?