CordovaFirefoxOS
Jump to navigation
Jump to search
This page is to document the development of Cordova for FirefoxOS. It is edited quite often, co
General issues
- Cordova rewrites the navigator object.
- The temporary solution is to comment out https://github.com/apache/cordova-js/blob/master/lib/scripts/bootstrap.js#L67. This implies more issues, especially firing several events needs to be forced.
- It is no longer the case for FirefoxOS 1.2.0. Further investigation is needed as onCordovaConnectionReady is still not fired.
API shim development
Cordova | FirefoxOS | What's left | Status (%) | Developer |
---|---|---|---|---|
Accelerometer | devicemotion, DeviceMotionEvent.acceleration | Cordova provides getCurrentAcceleration and watchAcceleration . This is easy to simulate using DeviceMotionEvent . getCurrentAcceleration will simply call it once and clear the watcher afterwards. The only advantage will be the acceleratorOptions which contains frequency property. There is also a timestamp property returned to Cordova's callback.
|
||
Camera | WebActivities, Pick image example | The problematic parts are specified in cameraOptions:
Currently only the response as URI is supported |
20% | zalun |
Capture | WebActivities | The main differences are in the object returned to the callbacks, some on-the-fly transition will be needed. | ||
Compass | deviceorientation | FirefoxOS provides support as an event. Use absolute parameter to check if the device is able to provide the Earth coordinate frame
|
||
Connection | navigator.connection | Cordova has a different object under the same navigator property name. FirefoxOS doesn't provide type of the connection to the apps. According to Harald' answer on StackOverflow "metered should be enough to tell if the user is on wifi".
|
||
Contacts | WebAPI/ContactsAPI | There are lacks in FxOS documentation of Contact fields (impp , url , address ). Some fields are not exactly corresponding to each other. FxOS has an ability to save only one organization. Cordova has no info about (anniversary , sex , genderIdentity )
|
||
Device | As for the moment FxOS does not provide any info about device to not certified apps. Following properties of device object will not returned: name , uuid , version , model
|
|||
Events | TBD (some of these will require a separate row in this table) | |||
File | TBD | |||
Geolocation | Using geolocation | The only difference is providing a timestamp as Date object | ||
Globalization | TBD | |||
InAppBrowser | Browser | The implementation is very different. Cordova uses window.open which is working in different way under FxOS. FxOS uses an iframe with mozbrowser attribute.
|
||
Media | Playing and recording music files. "The current implementation does not adhere to a W3C specification for media capture, and is provided for convenience only. A future implementation will adhere to the latest W3C specification and may deprecate the current APIs". | |||
Notification.alert | window.alert | UI | 90% | zalun |
Notification.confirm | window.confirm | UI | 90% | zalun |
Notification.prompt | window.prompt | UI | 90% | zalun |
Notification.beep | TBD | |||
Notification.vibrate | Vibration | None | ||
Splashscreen | TBD | |||
Storage | TBD |