Closed Bug 1413739 Opened 7 years ago Closed 7 years ago

Offer Firefox itself as an Assist App instead of the former Search Activity

Categories

(Firefox for Android Graveyard :: General, defect)

58 Branch
All
Android
defect
Not set
normal

Tracking

(relnote-firefox 59+, fennec+, firefox56 unaffected, firefox57 unaffected, firefox58- wontfix, firefox59 fixed)

RESOLVED FIXED
Firefox 59
Tracking Status
relnote-firefox --- 59+
fennec + ---
firefox56 --- unaffected
firefox57 --- unaffected
firefox58 - wontfix
firefox59 --- fixed

People

(Reporter: JanH, Assigned: JanH)

References

Details

Attachments

(3 files)

(In reply to Nick Alexander :nalexander from comment #25) > (In reply to Mark from comment #24) > > I just filed bugs 1406876 and 1407877 and got told Search Activity is going > > to die. Boo, a tragedy! But I understand. > > > > Can you at least tweak Fennec so that a long press of the Home button brings > > up Fennec with the cursor in the Awesomebar and the keyboard invoked. Like > > Samsung Internet Browser does? > > This is a cool idea. File the ticket, CC me, and we'll triage it? I didn't > know such things were possible. It seems the magic keyword is registering as an "Assist app" [1] and apparently the search activity used to do this. So we'd need to copy whatever magic incantation (presumably some intent filter) is necessary and make sure to handle that intent by opening a new tab (always about:home, or using the user's home page preference?) with editing mode enabled. [1] Settings -> Apps -> settings icon -> Default apps -> Assist & voice input -> Assist app
Assignee: nobody → jh+bugzilla
Starting from Lollipop, we can specify an icon that gets used when the user launches us as an assist app (see bug 1210242 where we did this for the former search activity and https://bug1210242.bmoattachments.org/attachment.cgi?id=8671541 for an example screenshot). Should I simply use our launcher icon, or do you prefer something else there?
Flags: needinfo?(chuang)
Hi Jan, I will suggest using our launcher icon. Could I see a screenshot once we put the icon on the list? :) Thank you!
Flags: needinfo?(chuang) → needinfo?(jh+bugzilla)
That's cool! Ni Max so he knows this.
Flags: needinfo?(max)
tracking-fennec: ? → +
Attached image assist_intent_logo.png
(In reply to Carol Huang [:Carol] from comment #2) > Could I see a screenshot once we put the icon on the list? :) Voila (I'm using the Hobbes icon for my local build, in case you're wondering).
Flags: needinfo?(jh+bugzilla)
Blocks: 1415278
[Tracking Requested - why for this release]: The search activity has been removed, so we should offer a replacement for users that had used Firefox as an assist app when long-pressing the home button.
Hi :JanH, We usually don't allow new feature to be added in beta cycle because it's not baked long enough in nightly cycle. In particular, we don't have aurora cycle anymore. I would suggest we let this ride the train. Track 58- and mark 58 won't fix.
You could argue that this is a regression from bug 1221344, though.
Max, if you don't have the time to review this, could you at least pass this off to someone else?
Attachment #8925256 - Flags: review?(max) → review?(topwu.tw)
Attachment #8925257 - Flags: review?(max) → review?(topwu.tw)
Hi Carol. Please take a look after the APK is generated.
Flags: needinfo?(cnevinchen)
Flags: needinfo?(chuang)
Attachment #8925256 - Flags: review?(topwu.tw) → review?(cnevinchen)
Attachment #8925257 - Flags: review?(topwu.tw) → review?(cnevinchen)
Comment on attachment 8925257 [details] Bug 1413739 - Part 2 - Simple test for handling of an ACTION_ASSIST intent. Remembered that I wanted to extend this to exercise the onNewIntent code path as well.
Flags: needinfo?(jh+bugzilla)
Attachment #8925257 - Flags: review?(cnevinchen)
Comment on attachment 8925256 [details] Bug 1413739 - Part 1 - Offer Firefox itself as an Assist App. https://reviewboard.mozilla.org/r/196466/#review209726 ::: mobile/android/base/java/org/mozilla/gecko/Tabs.java:1087 (Diff revision 2) > * Opens a new tab and loads either about:home or, if PREFS_HOMEPAGE_FOR_EVERY_NEW_TAB is set, > * the user's homepage. > */ > @RobocopTarget > public Tab addTab() { > - return loadUrl(getHomepageForNewTab(mAppContext), Tabs.LOADURL_NEW_TAB); > + return addTab(0); Maybe LOADURL_NONE? ::: mobile/android/base/java/org/mozilla/gecko/Tabs.java:1095 (Diff revision 2) > public Tab addPrivateTab() { > - return loadUrl(getHomepageForNewTab(mAppContext), Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_PRIVATE); > + return addTab(Tabs.LOADURL_PRIVATE); > + } > + > + public Tab addTab(int flags) { > + return loadUrl(getHomepageForNewTab(mAppContext), flags | Tabs.LOADURL_NEW_TAB); In my two cents, now Tabs class have too many ways to add atab. addTab..() and also loadUrl..(). I think it'll be better if we do this in one of those loadUrl(....) methods. How do you think?
Attachment #8925256 - Flags: review?(cnevinchen)
Comment on attachment 8925257 [details] Bug 1413739 - Part 2 - Simple test for handling of an ACTION_ASSIST intent. https://reviewboard.mozilla.org/r/196468/#review209730
Attachment #8925257 - Flags: review+
Comment on attachment 8925256 [details] Bug 1413739 - Part 1 - Offer Firefox itself as an Assist App. https://reviewboard.mozilla.org/r/196466/#review209726 > Maybe LOADURL_NONE? Yes, somehow I overlooked the existence of that.
Comment on attachment 8925256 [details] Bug 1413739 - Part 1 - Offer Firefox itself as an Assist App. https://reviewboard.mozilla.org/r/196466/#review209726 > In my two cents, now Tabs class have too many ways to add atab. addTab..() and also loadUrl..(). I think it'll be better if we do this in one of those loadUrl(....) methods. How do you think? I don't know - I think it's a nice shorthand so callers don't have to worry about what URL to use when opening a new tab.
Flags: needinfo?(jh+bugzilla)
Attachment #8925257 - Flags: review+ → review?(cnevinchen)
The Robocop test now tests both the onCreate and the onNewIntent code paths: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3a3a4b9c6dc9a10e6c1c245c9b2d892d25505fe3
Comment on attachment 8925256 [details] Bug 1413739 - Part 1 - Offer Firefox itself as an Assist App. https://reviewboard.mozilla.org/r/196466/#review210480 ::: mobile/android/base/java/org/mozilla/gecko/Tabs.java:1099 (Diff revision 3) > > public Tab addPrivateTab() { > - return loadUrl(getHomepageForNewTab(mAppContext), Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_PRIVATE); > + return addTab(Tabs.LOADURL_PRIVATE); > + } > + > + public Tab addTab(int flags) { Please hlep add a comment here for the reason "e.g. it's a shorthand so callers don't have to worry about what URL to use when opening a new tab."
Attachment #8925256 - Flags: review?(cnevinchen) → review+
Comment on attachment 8925257 [details] Bug 1413739 - Part 2 - Simple test for handling of an ACTION_ASSIST intent. https://reviewboard.mozilla.org/r/196468/#review210484 Thanks!
Attachment #8925257 - Flags: review?(cnevinchen) → review+
Pushed by mozilla@buttercookie.de: https://hg.mozilla.org/integration/autoland/rev/151826976a7d Part 1 - Offer Firefox itself as an Assist App. r=nechen https://hg.mozilla.org/integration/autoland/rev/92d7837be2db Part 2 - Simple test for handling of an ACTION_ASSIST intent. r=nechen
Release Note Request (optional, but appreciated) [Why is this notable]: This used to be possible via our Search Activity, which was removed in bug 1221344. This bug restores this functionality (open an activity where you can start a search with one of the search engines installed in Firefox) via Firefox itself. [Affects Firefox for Android]: Only [Suggested wording]: You can register Firefox as an Assist App to start a search by long-pressing the home button. [Links (documentation, blog post, etc)]: none
relnote-firefox: --- → ?
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
This is great, I love it. I've filed bug 1423566 re seeing the tabs tray instead of the new tab, I think it would be great to fix that too to polish it up. thanks for doing this Mark
Relnote added for 59.0b1 as New: "Added Firefox as an Assist App so users can start a search by long-pressing the home button"
Flags: needinfo?(max)
Flags: needinfo?(chuang)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: