在我的安卓应用程序中有一个 Notification,并且 notification有一个进度条。
如果我更新 notification 的进度条的进度时,我是要传递 notification 的同一个实例呢,还是要传递 Notification 的一个新实例?
应该这样:
mNotification = new Notification(..); // create in the constructor of my activity
getNotificationManager().notify(TAG, FILE_UPLOAD_ID, mNotification);
还是:
getNotificationManager().notify(TAG, FILE_UPLOAD_ID, new Notification(...) );