質問

I made an addon to Dektop Firefox using addon-sdk. now i want to launch it into firefox mobile(fennec) in android. I am using android 4.0.3 emulator. I have installed mobile firefox browsers(almost all versions) in it. im trying to install my addon to mobile firefox using addon-sdk. in this step i am getting different types of errors.

1.some addons installed with disable mode, but not working enable/disable option.

2.for some addons, i am getting "addon installed,restart required" option, but after restart, addon not visible in addon manager

please, provide atlesat one working way, to develop and install firefox addons(any simple) in fennec(any version) in andoid (any emulator/any mobile).

Thanks,

役に立ちましたか?

解決

You are asking the wrong question. Any version of Firefox Mobile supports extensions, no problems here. However, its user interface is very different from the desktop Firefox which means that extensions built for the desktop Firefox usually won't work without adjustments. So the correct question would be:

Which version of the Add-on SDK supports Firefox Mobile?

You need Add-on SDK 1.5 or higher. When running cfx you will have to use --force-mobile command line flag to make sure that your extension is marked as compatible with Firefox Mobile. There will still be limitations however, most SDK modules currently don't support Firefox Mobile. Add-on SDK 1.8 lists the following modules as supporting Firefox Mobile:

  • page-mod
  • page-worker
  • request
  • self
  • simple-storage
  • timers

他のヒント

Wladimir is correct, and I would only add that we are working on expanding module support on native Fennec. If you want to play with some additional Fennec features in an SDK-based add-on right now, you can get access to the NativeWindow and BrowserApp objects Fennec implements by using this code in a module:

let utils = require('api-utils/window-utils');
exports =  {
  BrowserApp: utils.activeBrowserWindow.BrowserApp,
  NativeWindow: utils.activeBrowserWindow.NativeWindow
};

The documentation for these objects is on MDN:

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top