Closed Bug 685523 Opened 13 years ago Closed 13 years ago

Allow running naive addon on Firefox Mobile

Categories

(Add-on SDK Graveyard :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(3 files)

Currently, we can't run anything on Fennec as we don't have related compatibility information set in the install.rdf file.

If we want to start working on any API, we would really like to have such change landed on master in order to avoid patching this manually each time we work on mobile.

The bad side effect of it is that people may start running fennec and seeing various errors if they use incompatible modules.

If we look at unit tests results, here is the list of high level api that works:
 - clipboard
 - hotkeys
 - notifications
 - passwords
 - request
 - simple-storage
 - timers

/!\ This doesn't mean that the API really work /!\
It only means that if you use them, you won't receive error messages.

And failing ones:
 - context-menu fails with correct message
 - page-mod, hidden frame module says "does not support this app"
 - page-worker, hidden frame module says "does not support this app"
 - panel fails with correct message
 - private-browser fails with correct message
 - selection fails with correct message
 - tabs fails with correct message
 - widget, says "*context-menu* doesn't support this app"
 - windows fails with correct message
Attached file Simplest package ever
Here is a simple package that only displays an alert message.
Assignee: nobody → poirot.alex
Attached file XPI for this package
Now a xpi file to test on a android hardware
Comment on attachment 559135 [details] [diff] [review]
Modify install.rdf

myk: Do you think that's fine enough, or do we have to add some additional message/flags/whatever ?
Attachment #559135 - Flags: review?(myk)
Bugzilla is definitely not mobile friendly… :)

However, I tested the XPI on a real Android device, and it works as expected (like in the Fennec app for desktop).

myk: yesterday I had a video call with Alex; we talked about mobile and he showed to me the code he has written. It's the same direction of mine but he has more than I have, honestly. I think it's a good start point but there are a couple of things I'd like to integrate and also the code could be improved in some areas (e.g. we have some big `if` for different code in FFD and FFM that could be removed). Alex agreed, so what about have a temporary branch for Mobile, in order to play with the code we have at the moment and try different approach before commit in the development branch?
Comment on attachment 559135 [details] [diff] [review]
Modify install.rdf

(In reply to Alexandre Poirot (:ochameau) from comment #3)
> myk: Do you think that's fine enough, or do we have to add some additional
> message/flags/whatever ?

This is a great first step, but we can't ship with Fennec marked as compatible by default when the vast majority of addons won't work on it!  I'd be happy to ship something like this that was flagged as experimental and disabled by default, however!

For example, we could add an experimental/temporary flag --enable-mobile to the cfx xpi command that triggered this.

(In the long term, there should be a different mechanism, like per-module app compatibility metadata that allows us to automatically determine the compatibility of an addon based on its module graph.  But a simple flag should get us started in the short term.)


(In reply to Matteo Ferretti [:matteo] [:zer0] from comment #4)
> what about have a temporary
> branch for Mobile, in order to play with the code we have at the moment and
> try different approach before commit in the development branch?

If y'all think a branch would be helpful, then sure, feel free to create one!  Just make sure to integrate early and often. :-)
Attachment #559135 - Flags: review?(myk) → review-
Blocks: 685564
Priority: -- → P1
Note: on a separate branch, the patch would be fine.  It's only if it is integrated into the main development branch now, before our mobile support is robust enough to enable by default, that it has to land as disabled by default on that branch.
Landed:
https://github.com/mozilla/addon-sdk/commit/33df04a244e705467a50d777cfbb53df9a1d5fad

So we added a new cfx option that allow to modify install.rdf dynamically so that it can run on Fennec:

   cfx --force-mobile
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: