- errorBuilder.setContentText(content);
- mNotificationManager.notify(tickerId, errorBuilder.build());
+ resultBuilder.setContentText(content);
+ mNotificationManager.notify(tickerId, resultBuilder.build());
+
+ // Remove success notification
+ if (uploadResult.isSuccess()) {
+ // Sleep 2 seconds, so show the notification before remove it
+ Handler handler = new Handler();
+ handler.postDelayed(new Runnable() {
+ public void run() {
+ mNotificationManager.cancel(R.string.uploader_upload_succeeded_ticker);
+ }
+ }, 2000);
+
+ }