I'm working on a bootstrapped extension for firefox android, and I have a problem with displaying icons in a new menu item:
itemMenuId = window.NativeWindow.menu.add("Show more details",ico , function() { showToast(window); });
in ico I wrote the uri of the icon file existing in the root of my extension (icon.png is next to bootstrap.js), using data: and file://, like described here but the icon isn't displayed. I don't know how to fix the path for that. Beside I'm having the same problem with the iconURL in the install.rdf file, when I use chrome:// I get nothing, and when I use resource:// I get a missing image. Should I have chrome.manifest to use chrome://? and even if I don't specify the url,to let the image be displayed by default like here it still doesn't work.
<em:iconURL>resource://trackdetect/icon.png</em:iconURL>
I googled it ,but, I couldn't fix it. Please help and thanks.
For the issue, just make sure you have a file named icon.png in the root of the XPI (the same folder as bootstrap.js) and the image will be used. You don't even need the entry in the manifest. See: https://developer.mozilla.org/en-US/docs/Install_Manifests#iconURL