Closed
Bug 1129433
Opened 11 years ago
Closed 10 years ago
Show "# tabs opened in background" notification in system tray
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox39 fixed)
RESOLVED
FIXED
Firefox 39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: antlam, Assigned: mhaigh)
References
Details
Attachments
(1 file, 1 obsolete file)
7.00 KB,
patch
|
mcomella
:
review+
|
Details | Diff | Splinter Review |
This allows for a persistent method for users to say "Ok, I'm done now, let me switch to Firefox".
We also discussed the possibility of extending this notifications functionality to allow the user to open these tabs on another device. But, more on that later as there are probably nuances we've yet to consider.
Reporter | ||
Updated•11 years ago
|
Assignee | ||
Comment 1•10 years ago
|
||
This patch basically just adds a notification with a message of "x tabs queued". I introduce a plurals file to help with some of the text, also I create a custom intent action which will be consumed in BrowserApp in another bug.
There's no way to programatically cancel the noticification currently - this will happen once we build the consumer of the new intent action.
Attachment #8566593 -
Flags: review?(michael.l.comella)
Assignee | ||
Comment 2•10 years ago
|
||
I missed out the new file o_O
Attachment #8566593 -
Attachment is obsolete: true
Attachment #8566593 -
Flags: review?(michael.l.comella)
Attachment #8566597 -
Flags: review?(michael.l.comella)
Comment on attachment 8566597 [details] [diff] [review]
Show tabs opened in background notification in system tray
Review of attachment 8566597 [details] [diff] [review]:
-----------------------------------------------------------------
r+ w/ nits.
::: mobile/android/base/resources/values/plurals.xml
@@ +3,5 @@
> + - License, v. 2.0. If a copy of the MPL was not distributed with this
> + - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
> +
> +<resources>
> + <plurals name="tab_queue_notification_message">
We can't use plurals, follow [1] as an example.
[1]: https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/locales/en-US/android_strings.dtd?rev=6706694c76db#441
::: mobile/android/base/tabqueue/TabQueueHelper.java
@@ +26,5 @@
> public static final String FILE_NAME = "tab_queue_url_list.json";
> public static final long TOAST_TIMEOUT = 3000;
> + public static final String LOAD_URLS_ACTION = "TAB_QUEUE_LOAD_URLS_ACTION";
> +
> + public static final int TAB_QUEUE_NOTIFICATION_ID = 783;
Where does this come from? How do we know it's unique? Perhaps we should off-load this to some library method that ensures notification ids are unique across the product.
@@ +76,5 @@
> + NotificationCompat.Builder builder =
> + new NotificationCompat.Builder(context)
> + .setSmallIcon(R.drawable.ic_status_logo)
> + .setContentTitle(context.getResources().getQuantityString(R.plurals.tab_queue_notification_title, tabsQueued))
> + .setContentText(context.getResources().getQuantityString(R.plurals.tab_queue_notification_message, tabsQueued, tabsQueued));
nit: resources as local var
::: mobile/android/base/tabqueue/TabQueueService.java
@@ +153,5 @@
> (new Thread() {
> @Override
> public void run() {
> + int tabsQueued = TabQueueHelper.queueUrl(GeckoProfile.get(getApplicationContext()), intentData);
> + TabQueueHelper.showNotification(getApplicationContext(), tabsQueued);
nit: Store application context in local var
Attachment #8566597 -
Flags: review?(michael.l.comella) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Assignee | ||
Comment 5•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•