Closed Bug 593113 Opened 15 years ago Closed 15 years ago

Show progress bar in download notification

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Android
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ashah, Assigned: alexp)

References

Details

Attachments

(1 file, 1 obsolete file)

On the android browser, while downloading a file, we can see the progress bar for the download in the android status bar. In Fennec, right now we just show the notification that the file is downloading. It would be good to have the progress bar feature for Fennec as well. Also we can show the percentage of the file downloaded (e.g. Downloading... 40% of 5 MB )
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
I don't think this bug is a duplicate. Bug 592088 implements the API, but currently Fennec does not use that API to display the download progress - this is still a TODO.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Assignee: nobody → alexp
Status: REOPENED → ASSIGNED
Attached patch Fix (obsolete) — Splinter Review
Added a download progress listener, which updates the notification.
Attachment #480839 - Flags: review?(mark.finkle)
Depends on: 601837
Blocks: 593108
Comment on attachment 480839 [details] [diff] [review] Fix >+ _progressSB: null, progressAlert >+ this._dlmgr = Cc["@mozilla.org/download-manager;1"].getService(Ci.nsIDownloadManager); >+ >+#ifdef ANDROID >+ this._progressSB = new StatusbarDownloadProgressListener(); >+ this._dlmgr.addListener(this._progressSB); >+#endif We don't want to move the download manager into the init method. We have it in the delayedInit method because it can slow things down Can you move this to the code that displays the "start downloading" alert? if _dlmgr is null, set it and then just do what you are doing here, but do it there. > _delayedInit: function dv__delayedInit() { >- this._dlmgr = Cc["@mozilla.org/download-manager;1"].getService(Ci.nsIDownloadManager); > this._progress = new DownloadProgressListener(); Keep this one as a fallback >+#ifdef ANDROID >+// StatusbarDownloadProgressListener is used to display progress in status bar notifications. >+function StatusbarDownloadProgressListener() { } StatusbarDownloadProgressListener -> AlertDownloadProgressListener r- for moving out of "init"
Attachment #480839 - Flags: review?(mark.finkle) → review-
Attached patch Fix v2Splinter Review
Fixed review comments.
Attachment #480839 - Attachment is obsolete: true
Attachment #481284 - Flags: review?(mark.finkle)
Comment on attachment 481284 [details] [diff] [review] Fix v2 Nice. This tested out OK on Android I assume.
Attachment #481284 - Flags: review?(mark.finkle) → review+
(In reply to comment #6) > Nice. This tested out OK on Android I assume. Sure! Works well on my Nexus One.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Flags: in-litmus?(nhirata.bugzilla)
Verified fixed on: Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110915 Firefox/9.0a1 Fennec/9.0a1 Device: Samsung Galaxy S OS: Android 2.2
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: