Permalink
Browse files

Merge branch 'dev'

  • Loading branch information...
2 parents 99dff47 + 0fbddb8 commit 031919be5b2f80bd3da85a8c5db513539489ef89 @stevengill stevengill committed Feb 6, 2014
View
@@ -61,3 +61,10 @@
* CB-2442 CB-2419 Use Windows.Storage.ApplicationData.current.localFolder, instead of writing to app package.
* [BlackBerry10] Adding platform level permissions
* CB-5599 Android: Catch and ignore OutOfMemoryError in getRotatedBitmap()
+
+### 0.2.7 (Feb 05, 2014)
+* CB-4919 firefox os quirks added and supported platforms list is updated
+* getPicture via web activities
+* Documented quirk for CB-5335 + CB-5206 for WP7+8
+* reference the correct firefoxos implementation
+* [BlackBerry10] Add permission to access_shared
View
@@ -78,6 +78,7 @@ than `DATA_URL`.
- Amazon Fire OS
- Android
- BlackBerry 10
+- Firefox OS
- iOS
- Tizen
- Windows Phone 7 and 8
@@ -102,6 +103,10 @@ Android uses intents to launch the camera activity on the device to capture
images, and on phones with low memory, the Cordova activity may be killed. In this
scenario, the image may not appear when the Cordova activity is restored.
+### Firefox OS Quirks
+
+Camera plugin is currently implemented using [Web Activities](https://hacks.mozilla.org/2013/01/introducing-web-activities/).
+
### iOS Quirks
Including a JavaScript `alert()` in either of the callback functions
@@ -253,6 +258,26 @@ Optional parameters to customize the camera settings.
- Ignores the `cameraDirection` parameter.
+### Firefox OS Quirks
+
+- Ignores the `quality` parameter.
+
+- `Camera.DestinationType` is ignored and equals `1` (image file URI)
+
+- Ignores the `allowEdit` parameter.
+
+- Ignores the `PictureSourceType` parameter (user chooses it in a dialog window)
+
+- Ignores the `encodingType`
+
+- Ignores the `targetWidth` and `targetHeight`
+
+- `Camera.MediaType` is not supported.
+
+- Ignores the `correctOrientation` parameter.
+
+- Ignores the `cameraDirection` parameter.
+
### iOS Quirks
- Set `quality` below 50 to avoid memory errors on some devices.
View
@@ -3,7 +3,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.apache.cordova.camera"
- version="0.2.6">
+ version="0.2.7">
<name>Camera</name>
<description>Cordova Camera Plugin</description>
<license>Apache 2.0</license>
@@ -33,10 +33,11 @@
</feature>
</config-file>
- <js-module src="src/firefoxos/camera.js" name="camera-impl">
+ <js-module src="src/firefoxos/CameraProxy.js" name="CameraProxy">
<runs />
</js-module>
- </platform>
+ </platform>
+
<!-- android -->
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
@@ -131,7 +132,7 @@
<feature name="Camera" value="Camera"/>
</config-file>
<config-file target="www/config.xml" parent="/widget/rim:permissions">
- <rim:permit>read_geolocation</rim:permit>
+ <rim:permit>access_shared</rim:permit>
</config-file>
<js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
<clobbers target="CameraPopoverHandle" />
@@ -195,20 +196,5 @@
</js-module>
</platform>
-
- <!-- firefoxos -->
- <platform name="firefoxos">
- <config-file target="config.xml" parent="/*">
- <feature name="Camera">
- <param name="firefoxos-package" value="Camera" />
- </feature>
- </config-file>
- <js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
- <clobbers target="CameraPopoverHandle" />
- </js-module>
- <js-module src="src/firefoxos/CameraProxy.js" name="CameraProxy">
- <runs />
- </js-module>
- </platform>
</plugin>
View
@@ -1,32 +0,0 @@
-
-var firefoxos = require('cordova/platform');
-
-function getPicture(cameraSuccess, cameraError, cameraOptions) {
- cameraError = cameraError || function(){};
- var pick = new MozActivity({
- name: "pick",
- data: {
- type: ["image/png", "image/jpg", "image/jpeg"]
- }
- });
- pick.onerror = cameraError;
- pick.onsuccess = function() {
- // image is returned as Blob in this.result.blob
- // we need to call cameraSuccess with url or base64 encoded image
- if (cameraOptions && cameraOptions.destinationType == 0) {
- // TODO: base64
- return;
- }
- if (!cameraOptions || !cameraOptions.destinationTyoe || cameraOptions.destinationType > 0) {
- // url
- return cameraSuccess(window.URL.createObjectURL(this.result.blob));
- }
- };
-}
-var Camera = {
- takePicture: getPicture,
- cleanup: function(){}
-};
-
-firefoxos.registerPlugin('Camera', Camera);
-
@@ -1,101 +0,0 @@
-jasmine.HtmlReporter = function(_doc) {
- var self = this;
- var doc = _doc || window.document;
-
- var reporterView;
-
- var dom = {};
-
- // Jasmine Reporter Public Interface
- self.logRunningSpecs = false;
-
- self.reportRunnerStarting = function(runner) {
- var specs = runner.specs() || [];
-
- if (specs.length == 0) {
- return;
- }
-
- createReporterDom(runner.env.versionString());
- doc.body.appendChild(dom.reporter);
-
- reporterView = new jasmine.HtmlReporter.ReporterView(dom);
- reporterView.addSpecs(specs, self.specFilter);
- };
-
- self.reportRunnerResults = function(runner) {
- reporterView && reporterView.complete();
- };
-
- self.reportSuiteResults = function(suite) {
- reporterView.suiteComplete(suite);
- };
-
- self.reportSpecStarting = function(spec) {
- if (self.logRunningSpecs) {
- self.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
- }
- };
-
- self.reportSpecResults = function(spec) {
- reporterView.specComplete(spec);
- };
-
- self.log = function() {
- var console = jasmine.getGlobal().console;
- if (console && console.log) {
- if (console.log.apply) {
- console.log.apply(console, arguments);
- } else {
- console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
- }
- }
- };
-
- self.specFilter = function(spec) {
- if (!focusedSpecName()) {
- return true;
- }
-
- return spec.getFullName().indexOf(focusedSpecName()) === 0;
- };
-
- return self;
-
- function focusedSpecName() {
- var specName;
-
- (function memoizeFocusedSpec() {
- if (specName) {
- return;
- }
-
- var paramMap = [];
- var params = doc.location.search.substring(1).split('&');
-
- for (var i = 0; i < params.length; i++) {
- var p = params[i].split('=');
- paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
- }
-
- specName = paramMap.spec;
- })();
-
- return specName;
- }
-
- function createReporterDom(version) {
- dom.reporter = self.createDom('div', { id: 'HTMLReporter', className: 'jasmine_reporter' },
- dom.banner = self.createDom('div', { className: 'banner' },
- self.createDom('span', { className: 'title' }, "Jasmine "),
- self.createDom('span', { className: 'version' }, version)),
-
- dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}),
- dom.alert = self.createDom('div', {className: 'alert'}),
- dom.results = self.createDom('div', {className: 'results'},
- dom.summary = self.createDom('div', { className: 'summary' }),
- dom.details = self.createDom('div', { id: 'details' }))
- );
- }
-};
-jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter);
@@ -1,60 +0,0 @@
-jasmine.HtmlReporterHelpers = {};
-
-jasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) {
- var el = document.createElement(type);
-
- for (var i = 2; i < arguments.length; i++) {
- var child = arguments[i];
-
- if (typeof child === 'string') {
- el.appendChild(document.createTextNode(child));
- } else {
- if (child) {
- el.appendChild(child);
- }
- }
- }
-
- for (var attr in attrs) {
- if (attr == "className") {
- el[attr] = attrs[attr];
- } else {
- el.setAttribute(attr, attrs[attr]);
- }
- }
-
- return el;
-};
-
-jasmine.HtmlReporterHelpers.getSpecStatus = function(child) {
- var results = child.results();
- var status = results.passed() ? 'passed' : 'failed';
- if (results.skipped) {
- status = 'skipped';
- }
-
- return status;
-};
-
-jasmine.HtmlReporterHelpers.appendToSummary = function(child, childElement) {
- var parentDiv = this.dom.summary;
- var parentSuite = (typeof child.parentSuite == 'undefined') ? 'suite' : 'parentSuite';
- var parent = child[parentSuite];
-
- if (parent) {
- if (typeof this.views.suites[parent.id] == 'undefined') {
- this.views.suites[parent.id] = new jasmine.HtmlReporter.SuiteView(parent, this.dom, this.views);
- }
- parentDiv = this.views.suites[parent.id].element;
- }
-
- parentDiv.appendChild(childElement);
-};
-
-
-jasmine.HtmlReporterHelpers.addHelpers = function(ctor) {
- for(var fn in jasmine.HtmlReporterHelpers) {
- ctor.prototype[fn] = jasmine.HtmlReporterHelpers[fn];
- }
-};
-
Oops, something went wrong.

0 comments on commit 031919b

Please sign in to comment.