Closed Bug 1155291 Opened 9 years ago Closed 9 years ago

See if we can display the Tab Queue toast without the permission bump

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mhaigh, Assigned: mhaigh)

References

Details

In https://bugzilla.mozilla.org/show_bug.cgi?id=1130368#c22 mcomella suggests an alternate way of displaying the Tab Queue toast which may not require the permission bump (comment below for convenience).  

Investigate if this approach will work and if so file a new bug to convert the code over.

Original comment:
How did you display the toast? I found out the ShareDialog uses Toast.show, and it seems like we can add any arbitrary content to the toast (but I haven't done any research). The background app seems to be interactable while the Toast fades away.

[1]: https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/overlays/ui/OverlayToastHelper.java?rev=48e03a88b6a8#70
I think I read some SO posts (that I can no longer find) saying a toast is not expected to receive touch events - this would invalidate the option in comment 0.
How does the share overlay work? Is that different because it's triggered from a share intent? But when the user clicks a link, I imagine we're also handling an intent for that.

I definitely think we should explore whether we can implement this new toast without the permissions bump.
(In reply to :Margaret Leibovic from comment #2)
> How does the share overlay work? Is that different because it's triggered
> from a share intent? But when the user clicks a link, I imagine we're also
> handling an intent for that.

The difference is that in the tab queue toast, we want the user interacting with the background Activity (not ours) but still be able to interact with the toast, while with the share overlay we want the user to interact with the ShareOverlay and *only* the share overlay. The share overlay toast uses the Toast API to appear over the background Activity but is non-interactable.
The share overlay itself (not the "tab sent!" toast) is actually a transparent activity; it shows the launching activity, but you can't interact with it. The activity beneath even gets onPause, IIRC.
There's currently no alternate way to display an interactive view of ours over a third party activity whilst still allowing that app to be interactive without a permission bump :(
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Thanks for the investigation and the explanation. Tab queues is a sweet feature, so hopefully users will accept the permissions bump :)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.