MozActivity support for web apps on Android

RESOLVED DUPLICATE of bug 776027

Status

()

Firefox for Android
Web Apps
RESOLVED DUPLICATE of bug 776027
5 years ago
4 years ago

People

(Reporter: Brion Vibber, Unassigned)

Tracking

19 Branch
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20121223 Firefox/20.0
Build ID: 20121223030832

Steps to reproduce:

I have a test instance of Wikipedia's in-progress Firefox web app at <http://ff.leuksman.com/manifest.webapp>... it uses the MozActivity class to open external links in the main browser instead of a popup window on Firefox OS.


Actual results:

On Firefox for Android, MozActivity isn't available and we fall back to window.open() which opens a popup window within the app. This isn't a very good user experience as you can't switch back to our app without closing the window, you can't bookmark it in your browser, etc.


Expected results:

It would be great if, at a minimum, Firefox apps and Firefox itself could communicate with each other via MozActivity as they can on Firefox OS; this would allow opening external URLs in the main Firefox app, where they can be bookmarked etc.

Some sort of bridge with Android's Intents would be *awesome* but probably much harder.
Thanks for filing Brion! The wikipedia app is looking great.

I think the easiest integration point for us to do this is probably in the ActivityDatabase:

http://mxr.mozilla.org/mozilla-central/source/dom/activities/src/ActivitiesService.jsm

We want to show webapp activities that have registered (at least they'll be able to work together, even if they can't dynamically register themselves with Android yet), alongside native apps. We'll likely need to somehow translate the Web Activity data argument:

https://developer.mozilla.org/en-US/docs/WebAPI/Web_Activities

to an Android intent (adjusting for any differences between Android and the WebAppRT) and attach the data as well. There's also a Glue component for showing the dialog that correlates with: http://mxr.mozilla.org/mozilla-central/source/b2g/components/ActivitiesGlue.js  We can create a native dialog here, just like we already do for file inputs.

Updated

5 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 776027
You need to log in before you can comment on or make changes to this bug.