Before you can harness the power of magic, you must make a difficult choice.
The key to unlocking your inner power is channeling it into one of the elements.
- Once you have chosen, it is extremely difficult to change.
+ Once you have chosen, you cannot change your mind.
Choose wisely.
diff --git a/platforms/android/assets/www/screens/place.html b/platforms/android/assets/www/screens/place.html
index d9b5c44..c54a4c6 100644
--- a/platforms/android/assets/www/screens/place.html
+++ b/platforms/android/assets/www/screens/place.html
@@ -4,15 +4,119 @@
Type:
Life:
+
\ No newline at end of file
diff --git a/platforms/android/build.gradle b/platforms/android/build.gradle
index f25d2f1..f7dae9f 100644
--- a/platforms/android/build.gradle
+++ b/platforms/android/build.gradle
@@ -86,7 +86,6 @@ ext {
}
// PLUGIN GRADLE EXTENSIONS START
-apply from: "phonegap-plugin-barcodescanner/TerranQuest-barcodescanner.gradle"
// PLUGIN GRADLE EXTENSIONS END
def hasBuildExtras = file('build-extras.gradle').exists()
diff --git a/platforms/android/libs/barcodescanner.aar b/platforms/android/libs/barcodescanner.aar
deleted file mode 100644
index abea644..0000000
Binary files a/platforms/android/libs/barcodescanner.aar and /dev/null differ
diff --git a/platforms/android/phonegap-plugin-barcodescanner/TerranQuest-barcodescanner.gradle b/platforms/android/phonegap-plugin-barcodescanner/TerranQuest-barcodescanner.gradle
deleted file mode 100644
index ff2b44d..0000000
--- a/platforms/android/phonegap-plugin-barcodescanner/TerranQuest-barcodescanner.gradle
+++ /dev/null
@@ -1,20 +0,0 @@
-ext.cdvMinSdkVersion = 15
-
-repositories{
- jcenter()
- flatDir{
- dirs 'libs'
- }
-}
-
-dependencies {
- compile 'com.android.support:support-v4:+'
- compile(name:'barcodescanner', ext:'aar')
-}
-
-android {
- packagingOptions {
- exclude 'META-INF/NOTICE'
- exclude 'META-INF/LICENSE'
- }
-}
\ No newline at end of file
diff --git a/platforms/android/platform_www/cordova_plugins.js b/platforms/android/platform_www/cordova_plugins.js
index 93dfdbf..1d13f65 100644
--- a/platforms/android/platform_www/cordova_plugins.js
+++ b/platforms/android/platform_www/cordova_plugins.js
@@ -301,13 +301,6 @@ module.exports = [
"file": "plugins/cordova-plugin-whitelist/whitelist.js",
"id": "cordova-plugin-whitelist.whitelist",
"runs": true
- },
- {
- "file": "plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js",
- "id": "phonegap-plugin-barcodescanner.BarcodeScanner",
- "clobbers": [
- "cordova.plugins.barcodeScanner"
- ]
}
];
module.exports.metadata =
@@ -324,8 +317,7 @@ module.exports.metadata =
"cordova-plugin-media-capture": "1.2.1-dev",
"cordova-plugin-network-information": "1.2.1-dev",
"cordova-plugin-splashscreen": "3.2.2-dev",
- "cordova-plugin-whitelist": "1.2.1",
- "phonegap-plugin-barcodescanner": "6.0.1"
+ "cordova-plugin-whitelist": "1.2.1"
};
// BOTTOM OF METADATA
});
\ No newline at end of file
diff --git a/platforms/android/platform_www/plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js b/platforms/android/platform_www/plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js
deleted file mode 100644
index 4711883..0000000
--- a/platforms/android/platform_www/plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js
+++ /dev/null
@@ -1,150 +0,0 @@
-cordova.define("phonegap-plugin-barcodescanner.BarcodeScanner", function(require, exports, module) {
-/**
- * cordova is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- *
- * Copyright (c) Matt Kane 2010
- * Copyright (c) 2011, IBM Corporation
- */
-
-
- var exec = require("cordova/exec");
-
- var scanInProgress = false;
-
- /**
- * Constructor.
- *
- * @returns {BarcodeScanner}
- */
- function BarcodeScanner() {
-
- /**
- * Encoding constants.
- *
- * @type Object
- */
- this.Encode = {
- TEXT_TYPE: "TEXT_TYPE",
- EMAIL_TYPE: "EMAIL_TYPE",
- PHONE_TYPE: "PHONE_TYPE",
- SMS_TYPE: "SMS_TYPE"
- // CONTACT_TYPE: "CONTACT_TYPE", // TODO: not implemented, requires passing a Bundle class from Javascript to Java
- // LOCATION_TYPE: "LOCATION_TYPE" // TODO: not implemented, requires passing a Bundle class from Javascript to Java
- };
-
- /**
- * Barcode format constants, defined in ZXing library.
- *
- * @type Object
- */
- this.format = {
- "all_1D": 61918,
- "aztec": 1,
- "codabar": 2,
- "code_128": 16,
- "code_39": 4,
- "code_93": 8,
- "data_MATRIX": 32,
- "ean_13": 128,
- "ean_8": 64,
- "itf": 256,
- "maxicode": 512,
- "msi": 131072,
- "pdf_417": 1024,
- "plessey": 262144,
- "qr_CODE": 2048,
- "rss_14": 4096,
- "rss_EXPANDED": 8192,
- "upc_A": 16384,
- "upc_E": 32768,
- "upc_EAN_EXTENSION": 65536
- };
- }
-
-/**
- * Read code from scanner.
- *
- * @param {Function} successCallback This function will recieve a result object: {
- * text : '12345-mock', // The code that was scanned.
- * format : 'FORMAT_NAME', // Code format.
- * cancelled : true/false, // Was canceled.
- * }
- * @param {Function} errorCallback
- * @param config
- */
-BarcodeScanner.prototype.scan = function (successCallback, errorCallback, config) {
-
- if (config instanceof Array) {
- // do nothing
- } else {
- if (typeof(config) === 'object') {
- config = [ config ];
- } else {
- config = [];
- }
- }
-
- if (errorCallback == null) {
- errorCallback = function () {
- };
- }
-
- if (typeof errorCallback != "function") {
- console.log("BarcodeScanner.scan failure: failure parameter not a function");
- return;
- }
-
- if (typeof successCallback != "function") {
- console.log("BarcodeScanner.scan failure: success callback parameter must be a function");
- return;
- }
-
- if (scanInProgress) {
- errorCallback('Scan is already in progress');
- return;
- }
-
- scanInProgress = true;
-
- exec(
- function(result) {
- scanInProgress = false;
- successCallback(result);
- },
- function(error) {
- scanInProgress = false;
- errorCallback(error);
- },
- 'BarcodeScanner',
- 'scan',
- config
- );
- };
-
- //-------------------------------------------------------------------
- BarcodeScanner.prototype.encode = function (type, data, successCallback, errorCallback, options) {
- if (errorCallback == null) {
- errorCallback = function () {
- };
- }
-
- if (typeof errorCallback != "function") {
- console.log("BarcodeScanner.encode failure: failure parameter not a function");
- return;
- }
-
- if (typeof successCallback != "function") {
- console.log("BarcodeScanner.encode failure: success callback parameter must be a function");
- return;
- }
-
- exec(successCallback, errorCallback, 'BarcodeScanner', 'encode', [
- {"type": type, "data": data, "options": options}
- ]);
- };
-
- var barcodeScanner = new BarcodeScanner();
- module.exports = barcodeScanner;
-
-});
diff --git a/platforms/android/project.properties b/platforms/android/project.properties
index fd52224..41602fd 100644
--- a/platforms/android/project.properties
+++ b/platforms/android/project.properties
@@ -12,4 +12,3 @@
# Project target.
target=android-23
android.library.reference.1=CordovaLib
-cordova.gradle.include.1=phonegap-plugin-barcodescanner/TerranQuest-barcodescanner.gradle
\ No newline at end of file
diff --git a/platforms/android/res/xml/config.xml b/platforms/android/res/xml/config.xml
index b5b43ba..233ba01 100644
--- a/platforms/android/res/xml/config.xml
+++ b/platforms/android/res/xml/config.xml
@@ -34,9 +34,6 @@
-
-
- TerranQuest
diff --git a/platforms/android/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java b/platforms/android/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java
deleted file mode 100644
index f2d4234..0000000
--- a/platforms/android/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/**
- * PhoneGap is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- *
- * Copyright (c) Matt Kane 2010
- * Copyright (c) 2011, IBM Corporation
- * Copyright (c) 2013, Maciej Nux Jaros
- */
-package com.phonegap.plugins.barcodescanner;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import android.Manifest;
-import android.app.Activity;
-import android.content.Intent;
-import android.util.Log;
-import android.content.pm.PackageManager;
-
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.PluginResult;
-import org.apache.cordova.PermissionHelper;
-
-import com.google.zxing.client.android.Intents;
-
-/**
- * This calls out to the ZXing barcode reader and returns the result.
- *
- * @sa https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaPlugin.java
- */
-public class BarcodeScanner extends CordovaPlugin {
- public static final int REQUEST_CODE = 0x0ba7c0de;
-
- private static final String SCAN = "scan";
- private static final String ENCODE = "encode";
- private static final String CANCELLED = "cancelled";
- private static final String FORMAT = "format";
- private static final String TEXT = "text";
- private static final String DATA = "data";
- private static final String TYPE = "type";
- private static final String PREFER_FRONTCAMERA = "preferFrontCamera";
- private static final String ORIENTATION = "orientation";
- private static final String SHOW_FLIP_CAMERA_BUTTON = "showFlipCameraButton";
- private static final String FORMATS = "formats";
- private static final String PROMPT = "prompt";
- private static final String SCAN_INTENT = "com.google.zxing.client.android.SCAN";
- private static final String ENCODE_DATA = "ENCODE_DATA";
- private static final String ENCODE_TYPE = "ENCODE_TYPE";
- private static final String ENCODE_INTENT = "com.phonegap.plugins.barcodescanner.ENCODE";
- private static final String TEXT_TYPE = "TEXT_TYPE";
- private static final String EMAIL_TYPE = "EMAIL_TYPE";
- private static final String PHONE_TYPE = "PHONE_TYPE";
- private static final String SMS_TYPE = "SMS_TYPE";
-
- private static final String LOG_TAG = "BarcodeScanner";
-
- private String [] permissions = { Manifest.permission.CAMERA };
-
- private JSONArray requestArgs;
- private CallbackContext callbackContext;
-
- /**
- * Constructor.
- */
- public BarcodeScanner() {
- }
-
- /**
- * Executes the request.
- *
- * This method is called from the WebView thread. To do a non-trivial amount of work, use:
- * cordova.getThreadPool().execute(runnable);
- *
- * To run on the UI thread, use:
- * cordova.getActivity().runOnUiThread(runnable);
- *
- * @param action The action to execute.
- * @param args The exec() arguments.
- * @param callbackContext The callback context used when calling back into JavaScript.
- * @return Whether the action was valid.
- *
- * @sa https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaPlugin.java
- */
- @Override
- public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {
- this.callbackContext = callbackContext;
- this.requestArgs = args;
-
- if (action.equals(ENCODE)) {
- JSONObject obj = args.optJSONObject(0);
- if (obj != null) {
- String type = obj.optString(TYPE);
- String data = obj.optString(DATA);
-
- // If the type is null then force the type to text
- if (type == null) {
- type = TEXT_TYPE;
- }
-
- if (data == null) {
- callbackContext.error("User did not specify data to encode");
- return true;
- }
-
- encode(type, data);
- } else {
- callbackContext.error("User did not specify data to encode");
- return true;
- }
- } else if (action.equals(SCAN)) {
-
- //android permission auto add
- if(!hasPermisssion()) {
- requestPermissions(0);
- } else {
- scan(args);
- }
- } else {
- return false;
- }
- return true;
- }
-
- /**
- * Starts an intent to scan and decode a barcode.
- */
- public void scan(final JSONArray args) {
-
- final CordovaPlugin that = this;
-
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
-
- Intent intentScan = new Intent(SCAN_INTENT);
- intentScan.addCategory(Intent.CATEGORY_DEFAULT);
-
- // add config as intent extras
- if (args.length() > 0) {
-
- JSONObject obj;
- JSONArray names;
- String key;
- Object value;
-
- for (int i = 0; i < args.length(); i++) {
-
- try {
- obj = args.getJSONObject(i);
- } catch (JSONException e) {
- Log.i("CordovaLog", e.getLocalizedMessage());
- continue;
- }
-
- names = obj.names();
- for (int j = 0; j < names.length(); j++) {
- try {
- key = names.getString(j);
- value = obj.get(key);
-
- if (value instanceof Integer) {
- intentScan.putExtra(key, (Integer) value);
- } else if (value instanceof String) {
- intentScan.putExtra(key, (String) value);
- }
-
- } catch (JSONException e) {
- Log.i("CordovaLog", e.getLocalizedMessage());
- }
- }
-
- intentScan.putExtra(Intents.Scan.CAMERA_ID, obj.optBoolean(PREFER_FRONTCAMERA, false) ? 1 : 0);
- intentScan.putExtra(Intents.Scan.SHOW_FLIP_CAMERA_BUTTON, obj.optBoolean(SHOW_FLIP_CAMERA_BUTTON, false));
- if (obj.has(FORMATS)) {
- intentScan.putExtra(Intents.Scan.FORMATS, obj.optString(FORMATS));
- }
- if (obj.has(PROMPT)) {
- intentScan.putExtra(Intents.Scan.PROMPT_MESSAGE, obj.optString(PROMPT));
- }
- if (obj.has(ORIENTATION)) {
- intentScan.putExtra(Intents.Scan.ORIENTATION_LOCK, obj.optString(ORIENTATION));
- }
- }
-
- }
-
- // avoid calling other phonegap apps
- intentScan.setPackage(that.cordova.getActivity().getApplicationContext().getPackageName());
-
- that.cordova.startActivityForResult(that, intentScan, REQUEST_CODE);
- }
- });
- }
-
- /**
- * Called when the barcode scanner intent completes.
- *
- * @param requestCode The request code originally supplied to startActivityForResult(),
- * allowing you to identify who this result came from.
- * @param resultCode The integer result code returned by the child activity through its setResult().
- * @param intent An Intent, which can return result data to the caller (various data can be attached to Intent "extras").
- */
- @Override
- public void onActivityResult(int requestCode, int resultCode, Intent intent) {
- if (requestCode == REQUEST_CODE && this.callbackContext != null) {
- if (resultCode == Activity.RESULT_OK) {
- JSONObject obj = new JSONObject();
- try {
- obj.put(TEXT, intent.getStringExtra("SCAN_RESULT"));
- obj.put(FORMAT, intent.getStringExtra("SCAN_RESULT_FORMAT"));
- obj.put(CANCELLED, false);
- } catch (JSONException e) {
- Log.d(LOG_TAG, "This should never happen");
- }
- //this.success(new PluginResult(PluginResult.Status.OK, obj), this.callback);
- this.callbackContext.success(obj);
- } else if (resultCode == Activity.RESULT_CANCELED) {
- JSONObject obj = new JSONObject();
- try {
- obj.put(TEXT, "");
- obj.put(FORMAT, "");
- obj.put(CANCELLED, true);
- } catch (JSONException e) {
- Log.d(LOG_TAG, "This should never happen");
- }
- //this.success(new PluginResult(PluginResult.Status.OK, obj), this.callback);
- this.callbackContext.success(obj);
- } else {
- //this.error(new PluginResult(PluginResult.Status.ERROR), this.callback);
- this.callbackContext.error("Unexpected error");
- }
- }
- }
-
- /**
- * Initiates a barcode encode.
- *
- * @param type Endoiding type.
- * @param data The data to encode in the bar code.
- */
- public void encode(String type, String data) {
- Intent intentEncode = new Intent(ENCODE_INTENT);
- intentEncode.putExtra(ENCODE_TYPE, type);
- intentEncode.putExtra(ENCODE_DATA, data);
- // avoid calling other phonegap apps
- intentEncode.setPackage(this.cordova.getActivity().getApplicationContext().getPackageName());
-
- this.cordova.getActivity().startActivity(intentEncode);
- }
-
- /**
- * check application's permissions
- */
- public boolean hasPermisssion() {
- for(String p : permissions)
- {
- if(!PermissionHelper.hasPermission(this, p))
- {
- return false;
- }
- }
- return true;
- }
-
- /**
- * We override this so that we can access the permissions variable, which no longer exists in
- * the parent class, since we can't initialize it reliably in the constructor!
- *
- * @param requestCode The code to get request action
- */
- public void requestPermissions(int requestCode)
- {
- PermissionHelper.requestPermissions(this, requestCode, permissions);
- }
-
- /**
- * processes the result of permission request
- *
- * @param requestCode The code to get request action
- * @param permissions The collection of permissions
- * @param grantResults The result of grant
- */
- public void onRequestPermissionResult(int requestCode, String[] permissions,
- int[] grantResults) throws JSONException
- {
- PluginResult result;
- for (int r : grantResults) {
- if (r == PackageManager.PERMISSION_DENIED) {
- Log.d(LOG_TAG, "Permission Denied!");
- result = new PluginResult(PluginResult.Status.ILLEGAL_ACCESS_EXCEPTION);
- this.callbackContext.sendPluginResult(result);
- return;
- }
- }
-
- switch(requestCode)
- {
- case 0:
- scan(this.requestArgs);
- break;
- }
- }
-
-}
diff --git a/platforms/browser/browser.json b/platforms/browser/browser.json
index 37bb068..3f022ab 100644
--- a/platforms/browser/browser.json
+++ b/platforms/browser/browser.json
@@ -15,10 +15,6 @@
{
"xml": "",
"count": 1
- },
- {
- "xml": "",
- "count": 1
}
]
}
@@ -61,9 +57,6 @@
},
"cordova-plugin-geolocation": {
"PACKAGE_NAME": "com.netsyms.terranquest.TerranQuest"
- },
- "phonegap-plugin-barcodescanner": {
- "PACKAGE_NAME": "com.netsyms.terranquest.TerranQuest"
}
},
"dependent_plugins": {},
@@ -429,20 +422,6 @@
"id": "cordova-plugin-media-capture.CaptureProxy",
"pluginId": "cordova-plugin-media-capture",
"runs": true
- },
- {
- "file": "plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js",
- "id": "phonegap-plugin-barcodescanner.BarcodeScanner",
- "pluginId": "phonegap-plugin-barcodescanner",
- "clobbers": [
- "cordova.plugins.barcodeScanner"
- ]
- },
- {
- "file": "plugins/phonegap-plugin-barcodescanner/src/browser/BarcodeScannerProxy.js",
- "id": "phonegap-plugin-barcodescanner.BarcodeScannerProxy",
- "pluginId": "phonegap-plugin-barcodescanner",
- "runs": true
}
],
"plugin_metadata": {
@@ -457,7 +436,6 @@
"cordova-plugin-file": "4.1.1",
"cordova-plugin-media": "2.2.1-dev",
"cordova-plugin-media-capture": "1.2.1-dev",
- "cordova-plugin-geolocation": "2.1.1-dev",
- "phonegap-plugin-barcodescanner": "6.0.1"
+ "cordova-plugin-geolocation": "2.1.1-dev"
}
}
\ No newline at end of file
diff --git a/platforms/browser/config.xml b/platforms/browser/config.xml
index c797fa0..2e3d5bc 100644
--- a/platforms/browser/config.xml
+++ b/platforms/browser/config.xml
@@ -6,9 +6,6 @@
-
-
- TerranQuest
Augmented Reality fantasy game
diff --git a/platforms/browser/platform_www/cordova_plugins.js b/platforms/browser/platform_www/cordova_plugins.js
index 9abfd5f..45d3998 100644
--- a/platforms/browser/platform_www/cordova_plugins.js
+++ b/platforms/browser/platform_www/cordova_plugins.js
@@ -361,20 +361,6 @@ module.exports = [
"id": "cordova-plugin-media-capture.CaptureProxy",
"pluginId": "cordova-plugin-media-capture",
"runs": true
- },
- {
- "file": "plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js",
- "id": "phonegap-plugin-barcodescanner.BarcodeScanner",
- "pluginId": "phonegap-plugin-barcodescanner",
- "clobbers": [
- "cordova.plugins.barcodeScanner"
- ]
- },
- {
- "file": "plugins/phonegap-plugin-barcodescanner/src/browser/BarcodeScannerProxy.js",
- "id": "phonegap-plugin-barcodescanner.BarcodeScannerProxy",
- "pluginId": "phonegap-plugin-barcodescanner",
- "runs": true
}
];
module.exports.metadata =
@@ -391,8 +377,7 @@ module.exports.metadata =
"cordova-plugin-file": "4.1.1",
"cordova-plugin-media": "2.2.1-dev",
"cordova-plugin-media-capture": "1.2.1-dev",
- "cordova-plugin-geolocation": "2.1.1-dev",
- "phonegap-plugin-barcodescanner": "6.0.1"
+ "cordova-plugin-geolocation": "2.1.1-dev"
}
// BOTTOM OF METADATA
});
\ No newline at end of file
diff --git a/platforms/browser/platform_www/plugins/phonegap-plugin-barcodescanner/src/browser/BarcodeScannerProxy.js b/platforms/browser/platform_www/plugins/phonegap-plugin-barcodescanner/src/browser/BarcodeScannerProxy.js
deleted file mode 100644
index 71d9898..0000000
--- a/platforms/browser/platform_www/plugins/phonegap-plugin-barcodescanner/src/browser/BarcodeScannerProxy.js
+++ /dev/null
@@ -1,25 +0,0 @@
-cordova.define("phonegap-plugin-barcodescanner.BarcodeScannerProxy", function(require, exports, module) { function scan(success, error) {
- var code = window.prompt("Enter barcode value (empty value will fire the error handler):");
- if(code) {
- var result = {
- text:code,
- format:"Fake",
- cancelled:false
- };
- success(result);
- } else {
- error("No barcode");
- }
-}
-
-function encode(type, data, success, errorCallback) {
- success();
-}
-
-module.exports = {
- scan: scan,
- encode: encode
-};
-
-require("cordova/exec/proxy").add("BarcodeScanner",module.exports);
-});
diff --git a/platforms/browser/platform_www/plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js b/platforms/browser/platform_www/plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js
deleted file mode 100644
index a7e7f11..0000000
--- a/platforms/browser/platform_www/plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js
+++ /dev/null
@@ -1,149 +0,0 @@
-cordova.define("phonegap-plugin-barcodescanner.BarcodeScanner", function(require, exports, module) { /**
- * cordova is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- *
- * Copyright (c) Matt Kane 2010
- * Copyright (c) 2011, IBM Corporation
- */
-
-
- var exec = require("cordova/exec");
-
- var scanInProgress = false;
-
- /**
- * Constructor.
- *
- * @returns {BarcodeScanner}
- */
- function BarcodeScanner() {
-
- /**
- * Encoding constants.
- *
- * @type Object
- */
- this.Encode = {
- TEXT_TYPE: "TEXT_TYPE",
- EMAIL_TYPE: "EMAIL_TYPE",
- PHONE_TYPE: "PHONE_TYPE",
- SMS_TYPE: "SMS_TYPE"
- // CONTACT_TYPE: "CONTACT_TYPE", // TODO: not implemented, requires passing a Bundle class from Javascript to Java
- // LOCATION_TYPE: "LOCATION_TYPE" // TODO: not implemented, requires passing a Bundle class from Javascript to Java
- };
-
- /**
- * Barcode format constants, defined in ZXing library.
- *
- * @type Object
- */
- this.format = {
- "all_1D": 61918,
- "aztec": 1,
- "codabar": 2,
- "code_128": 16,
- "code_39": 4,
- "code_93": 8,
- "data_MATRIX": 32,
- "ean_13": 128,
- "ean_8": 64,
- "itf": 256,
- "maxicode": 512,
- "msi": 131072,
- "pdf_417": 1024,
- "plessey": 262144,
- "qr_CODE": 2048,
- "rss_14": 4096,
- "rss_EXPANDED": 8192,
- "upc_A": 16384,
- "upc_E": 32768,
- "upc_EAN_EXTENSION": 65536
- };
- }
-
-/**
- * Read code from scanner.
- *
- * @param {Function} successCallback This function will recieve a result object: {
- * text : '12345-mock', // The code that was scanned.
- * format : 'FORMAT_NAME', // Code format.
- * cancelled : true/false, // Was canceled.
- * }
- * @param {Function} errorCallback
- * @param config
- */
-BarcodeScanner.prototype.scan = function (successCallback, errorCallback, config) {
-
- if (config instanceof Array) {
- // do nothing
- } else {
- if (typeof(config) === 'object') {
- config = [ config ];
- } else {
- config = [];
- }
- }
-
- if (errorCallback == null) {
- errorCallback = function () {
- };
- }
-
- if (typeof errorCallback != "function") {
- console.log("BarcodeScanner.scan failure: failure parameter not a function");
- return;
- }
-
- if (typeof successCallback != "function") {
- console.log("BarcodeScanner.scan failure: success callback parameter must be a function");
- return;
- }
-
- if (scanInProgress) {
- errorCallback('Scan is already in progress');
- return;
- }
-
- scanInProgress = true;
-
- exec(
- function(result) {
- scanInProgress = false;
- successCallback(result);
- },
- function(error) {
- scanInProgress = false;
- errorCallback(error);
- },
- 'BarcodeScanner',
- 'scan',
- config
- );
- };
-
- //-------------------------------------------------------------------
- BarcodeScanner.prototype.encode = function (type, data, successCallback, errorCallback, options) {
- if (errorCallback == null) {
- errorCallback = function () {
- };
- }
-
- if (typeof errorCallback != "function") {
- console.log("BarcodeScanner.encode failure: failure parameter not a function");
- return;
- }
-
- if (typeof successCallback != "function") {
- console.log("BarcodeScanner.encode failure: success callback parameter must be a function");
- return;
- }
-
- exec(successCallback, errorCallback, 'BarcodeScanner', 'encode', [
- {"type": type, "data": data, "options": options}
- ]);
- };
-
- var barcodeScanner = new BarcodeScanner();
- module.exports = barcodeScanner;
-
-});
diff --git a/platforms/browser/www/config.xml b/platforms/browser/www/config.xml
index c797fa0..2e3d5bc 100644
--- a/platforms/browser/www/config.xml
+++ b/platforms/browser/www/config.xml
@@ -6,9 +6,6 @@
-
-
- TerranQuest
Augmented Reality fantasy game
diff --git a/platforms/browser/www/cordova_plugins.js b/platforms/browser/www/cordova_plugins.js
index 9abfd5f..45d3998 100644
--- a/platforms/browser/www/cordova_plugins.js
+++ b/platforms/browser/www/cordova_plugins.js
@@ -361,20 +361,6 @@ module.exports = [
"id": "cordova-plugin-media-capture.CaptureProxy",
"pluginId": "cordova-plugin-media-capture",
"runs": true
- },
- {
- "file": "plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js",
- "id": "phonegap-plugin-barcodescanner.BarcodeScanner",
- "pluginId": "phonegap-plugin-barcodescanner",
- "clobbers": [
- "cordova.plugins.barcodeScanner"
- ]
- },
- {
- "file": "plugins/phonegap-plugin-barcodescanner/src/browser/BarcodeScannerProxy.js",
- "id": "phonegap-plugin-barcodescanner.BarcodeScannerProxy",
- "pluginId": "phonegap-plugin-barcodescanner",
- "runs": true
}
];
module.exports.metadata =
@@ -391,8 +377,7 @@ module.exports.metadata =
"cordova-plugin-file": "4.1.1",
"cordova-plugin-media": "2.2.1-dev",
"cordova-plugin-media-capture": "1.2.1-dev",
- "cordova-plugin-geolocation": "2.1.1-dev",
- "phonegap-plugin-barcodescanner": "6.0.1"
+ "cordova-plugin-geolocation": "2.1.1-dev"
}
// BOTTOM OF METADATA
});
\ No newline at end of file
diff --git a/platforms/browser/www/js/auth.js b/platforms/browser/www/js/auth.js
index ef9ca18..7179fc7 100644
--- a/platforms/browser/www/js/auth.js
+++ b/platforms/browser/www/js/auth.js
@@ -31,6 +31,7 @@ function checkUserHasTeamOpenChooserIfNot(username) {
}, function (data) {
if (data.status === 'OK' && data.stats.teamid !== null && data.stats.teamid > 0) {
// We're all good.
+ userteamid = data.stats.teamid;
openscreen("home");
} else {
// Open the team intro thingy
diff --git a/platforms/browser/www/js/main.js b/platforms/browser/www/js/main.js
index 421b3e2..44c2266 100644
--- a/platforms/browser/www/js/main.js
+++ b/platforms/browser/www/js/main.js
@@ -4,6 +4,7 @@ password = "";
energy = 100;
maxenergy = 100;
level = 1;
+userteamid = 0;
/*
* Runs when the app opens
diff --git a/platforms/browser/www/plugins/phonegap-plugin-barcodescanner/src/browser/BarcodeScannerProxy.js b/platforms/browser/www/plugins/phonegap-plugin-barcodescanner/src/browser/BarcodeScannerProxy.js
deleted file mode 100644
index 71d9898..0000000
--- a/platforms/browser/www/plugins/phonegap-plugin-barcodescanner/src/browser/BarcodeScannerProxy.js
+++ /dev/null
@@ -1,25 +0,0 @@
-cordova.define("phonegap-plugin-barcodescanner.BarcodeScannerProxy", function(require, exports, module) { function scan(success, error) {
- var code = window.prompt("Enter barcode value (empty value will fire the error handler):");
- if(code) {
- var result = {
- text:code,
- format:"Fake",
- cancelled:false
- };
- success(result);
- } else {
- error("No barcode");
- }
-}
-
-function encode(type, data, success, errorCallback) {
- success();
-}
-
-module.exports = {
- scan: scan,
- encode: encode
-};
-
-require("cordova/exec/proxy").add("BarcodeScanner",module.exports);
-});
diff --git a/platforms/browser/www/plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js b/platforms/browser/www/plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js
deleted file mode 100644
index a7e7f11..0000000
--- a/platforms/browser/www/plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js
+++ /dev/null
@@ -1,149 +0,0 @@
-cordova.define("phonegap-plugin-barcodescanner.BarcodeScanner", function(require, exports, module) { /**
- * cordova is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- *
- * Copyright (c) Matt Kane 2010
- * Copyright (c) 2011, IBM Corporation
- */
-
-
- var exec = require("cordova/exec");
-
- var scanInProgress = false;
-
- /**
- * Constructor.
- *
- * @returns {BarcodeScanner}
- */
- function BarcodeScanner() {
-
- /**
- * Encoding constants.
- *
- * @type Object
- */
- this.Encode = {
- TEXT_TYPE: "TEXT_TYPE",
- EMAIL_TYPE: "EMAIL_TYPE",
- PHONE_TYPE: "PHONE_TYPE",
- SMS_TYPE: "SMS_TYPE"
- // CONTACT_TYPE: "CONTACT_TYPE", // TODO: not implemented, requires passing a Bundle class from Javascript to Java
- // LOCATION_TYPE: "LOCATION_TYPE" // TODO: not implemented, requires passing a Bundle class from Javascript to Java
- };
-
- /**
- * Barcode format constants, defined in ZXing library.
- *
- * @type Object
- */
- this.format = {
- "all_1D": 61918,
- "aztec": 1,
- "codabar": 2,
- "code_128": 16,
- "code_39": 4,
- "code_93": 8,
- "data_MATRIX": 32,
- "ean_13": 128,
- "ean_8": 64,
- "itf": 256,
- "maxicode": 512,
- "msi": 131072,
- "pdf_417": 1024,
- "plessey": 262144,
- "qr_CODE": 2048,
- "rss_14": 4096,
- "rss_EXPANDED": 8192,
- "upc_A": 16384,
- "upc_E": 32768,
- "upc_EAN_EXTENSION": 65536
- };
- }
-
-/**
- * Read code from scanner.
- *
- * @param {Function} successCallback This function will recieve a result object: {
- * text : '12345-mock', // The code that was scanned.
- * format : 'FORMAT_NAME', // Code format.
- * cancelled : true/false, // Was canceled.
- * }
- * @param {Function} errorCallback
- * @param config
- */
-BarcodeScanner.prototype.scan = function (successCallback, errorCallback, config) {
-
- if (config instanceof Array) {
- // do nothing
- } else {
- if (typeof(config) === 'object') {
- config = [ config ];
- } else {
- config = [];
- }
- }
-
- if (errorCallback == null) {
- errorCallback = function () {
- };
- }
-
- if (typeof errorCallback != "function") {
- console.log("BarcodeScanner.scan failure: failure parameter not a function");
- return;
- }
-
- if (typeof successCallback != "function") {
- console.log("BarcodeScanner.scan failure: success callback parameter must be a function");
- return;
- }
-
- if (scanInProgress) {
- errorCallback('Scan is already in progress');
- return;
- }
-
- scanInProgress = true;
-
- exec(
- function(result) {
- scanInProgress = false;
- successCallback(result);
- },
- function(error) {
- scanInProgress = false;
- errorCallback(error);
- },
- 'BarcodeScanner',
- 'scan',
- config
- );
- };
-
- //-------------------------------------------------------------------
- BarcodeScanner.prototype.encode = function (type, data, successCallback, errorCallback, options) {
- if (errorCallback == null) {
- errorCallback = function () {
- };
- }
-
- if (typeof errorCallback != "function") {
- console.log("BarcodeScanner.encode failure: failure parameter not a function");
- return;
- }
-
- if (typeof successCallback != "function") {
- console.log("BarcodeScanner.encode failure: success callback parameter must be a function");
- return;
- }
-
- exec(successCallback, errorCallback, 'BarcodeScanner', 'encode', [
- {"type": type, "data": data, "options": options}
- ]);
- };
-
- var barcodeScanner = new BarcodeScanner();
- module.exports = barcodeScanner;
-
-});
diff --git a/platforms/browser/www/screens/chooseteam.html b/platforms/browser/www/screens/chooseteam.html
index c00fccc..de31813 100644
--- a/platforms/browser/www/screens/chooseteam.html
+++ b/platforms/browser/www/screens/chooseteam.html
@@ -2,7 +2,7 @@
Before you can harness the power of magic, you must make a difficult choice.
The key to unlocking your inner power is channeling it into one of the elements.
- Once you have chosen, it is extremely difficult to change.
+ Once you have chosen, you cannot change your mind.
Choose wisely.
diff --git a/platforms/browser/www/screens/place.html b/platforms/browser/www/screens/place.html
index d9b5c44..c54a4c6 100644
--- a/platforms/browser/www/screens/place.html
+++ b/platforms/browser/www/screens/place.html
@@ -4,15 +4,119 @@
Type:
Life:
+
\ No newline at end of file
diff --git a/plugins/android.json b/plugins/android.json
index 83cf89e..5a53869 100644
--- a/plugins/android.json
+++ b/plugins/android.json
@@ -36,9 +36,6 @@
},
"cordova-plugin-whitelist": {
"PACKAGE_NAME": "com.netsyms.terranquest.TerranQuest"
- },
- "phonegap-plugin-barcodescanner": {
- "PACKAGE_NAME": "com.netsyms.terranquest.TerranQuest"
}
},
"dependent_plugins": {
diff --git a/plugins/browser.json b/plugins/browser.json
index e425c3c..f8d85c2 100644
--- a/plugins/browser.json
+++ b/plugins/browser.json
@@ -36,9 +36,6 @@
},
"cordova-plugin-geolocation": {
"PACKAGE_NAME": "com.netsyms.terranquest.TerranQuest"
- },
- "phonegap-plugin-barcodescanner": {
- "PACKAGE_NAME": "com.netsyms.terranquest.TerranQuest"
}
},
"dependent_plugins": {
diff --git a/plugins/fetch.json b/plugins/fetch.json
index bb76783..043bba8 100644
--- a/plugins/fetch.json
+++ b/plugins/fetch.json
@@ -103,14 +103,5 @@
},
"is_top_level": true,
"variables": {}
- },
- "phonegap-plugin-barcodescanner": {
- "source": {
- "type": "git",
- "url": "https://github.com/phonegap/phonegap-plugin-barcodescanner.git",
- "subdir": "."
- },
- "is_top_level": true,
- "variables": {}
}
}
\ No newline at end of file
diff --git a/plugins/phonegap-plugin-barcodescanner/README.md b/plugins/phonegap-plugin-barcodescanner/README.md
deleted file mode 100644
index e82a1ed..0000000
--- a/plugins/phonegap-plugin-barcodescanner/README.md
+++ /dev/null
@@ -1,214 +0,0 @@
-# PhoneGap Plugin BarcodeScanner
-================================
-
-[![Build Status](https://travis-ci.org/phonegap/phonegap-plugin-barcodescanner.svg)](https://travis-ci.org/phonegap/phonegap-plugin-barcodescanner)
-
-Cross-platform BarcodeScanner for Cordova / PhoneGap.
-
-Follows the [Cordova Plugin spec](http://cordova.apache.org/docs/en/5.0.0/plugin_ref_spec.md), so that it works with [Plugman](https://github.com/apache/cordova-plugman).
-
-## Installation
-
-
-This requires phonegap 5.0+ ( current stable v3.0.0 )
-
- phonegap plugin add phonegap-plugin-barcodescanner
-
-Older versions of phonegap can still install via the __deprecated__ id ( stale v2.0.1 )
-
- phonegap plugin add com.phonegap.plugins.barcodescanner
-
-It is also possible to install via repo url directly ( unstable )
-
- phonegap plugin add https://github.com/phonegap/phonegap-plugin-barcodescanner.git
-
-### Supported Platforms
-
-- Android
-- iOS
-- Windows (Windows/Windows Phone 8.1 and Windows 10)
-- Windows Phone 8
-- BlackBerry 10
-- Browser
-
-Note: the Android source for this project includes an Android Library Project.
-plugman currently doesn't support Library Project refs, so its been
-prebuilt as a jar library. Any updates to the Library Project should be
-committed with an updated jar.
-
-Note: Windows 10 applications can not be build for `AnyCPU` architecture, which is default for Windows platform. If you want to build/run Windows 10 app, you should specify target architecture explicitly, for example (Cordova CLI):
-
-```
-cordova run windows -- --archs=x86
-```
-
-### PhoneGap Build
-If you're using [PhoneGap Build](https://build.phonegap.com/) please make sure you specify `gradle` as your Android build tool in `config.xml`: ``.
-
-## Using the plugin ##
-The plugin creates the object `cordova/plugin/BarcodeScanner` with the method `scan(success, fail)`.
-
-The following barcode types are currently supported:
-### Android
-
-* QR_CODE
-* DATA_MATRIX
-* UPC_E
-* UPC_A
-* EAN_8
-* EAN_13
-* CODE_128
-* CODE_39
-* CODE_93
-* CODABAR
-* ITF
-* RSS14
-* RSS_EXPANDED
-
-Not by default, but supported if you pass in the "formats" option:
-* PDF417
-* AZTEC
-
-### iOS
-
-* QR_CODE
-* DATA_MATRIX
-* UPC_E
-* UPC_A
-* EAN_8
-* EAN_13
-* CODE_128
-* CODE_39
-* ITF
-
-### Windows
-
-* UPC_A
-* UPC_E
-* EAN_8
-* EAN_13
-* CODE_39
-* CODE_93
-* CODE_128
-* ITF
-* CODABAR
-* MSI
-* RSS14
-* QR_CODE
-* DATA_MATRIX
-* AZTEC
-* PDF417
-
-### Windows Phone 8
-
-* UPC_A
-* UPC_E
-* EAN_8
-* EAN_13
-* CODE_39
-* CODE_93
-* CODE_128
-* ITF
-* CODABAR
-* MSI
-* RSS14
-* QR_CODE
-* DATA_MATRIX
-* AZTEC
-* PDF417
-
-### BlackBerry 10
-* UPC_A
-* UPC_E
-* EAN_8
-* EAN_13
-* CODE_39
-* CODE_128
-* ITF
-* DATA_MATRIX
-* AZTEC
-
-`success` and `fail` are callback functions. Success is passed an object with data, type and cancelled properties. Data is the text representation of the barcode data, type is the type of barcode detected and cancelled is whether or not the user cancelled the scan.
-
-A full example could be:
-```js
- cordova.plugins.barcodeScanner.scan(
- function (result) {
- alert("We got a barcode\n" +
- "Result: " + result.text + "\n" +
- "Format: " + result.format + "\n" +
- "Cancelled: " + result.cancelled);
- },
- function (error) {
- alert("Scanning failed: " + error);
- },
- {
- "preferFrontCamera" : true, // iOS and Android
- "showFlipCameraButton" : true, // iOS and Android
- "prompt" : "Place a barcode inside the scan area", // supported on Android only
- "formats" : "QR_CODE,PDF_417", // default: all but PDF_417 and RSS_EXPANDED
- "orientation" : "landscape" // Android only (portrait|landscape), default unset so it rotates with the device
- }
- );
-```
-
-## Encoding a Barcode ##
-
-The plugin creates the object `cordova.plugins.barcodeScanner` with the method `encode(type, data, success, fail)`.
-
-Supported encoding types:
-
-* TEXT_TYPE
-* EMAIL_TYPE
-* PHONE_TYPE
-* SMS_TYPE
-
-```
-A full example could be:
-
- cordova.plugins.barcodeScanner.encode(cordova.plugins.barcodeScanner.Encode.TEXT_TYPE, "http://www.nytimes.com", function(success) {
- alert("encode success: " + success);
- }, function(fail) {
- alert("encoding failed: " + fail);
- }
- );
-```
-
-## Windows quirks ##
-Windows implementation currently doesn't support encode functionality.
-
-## Windows Phone 8 quirks ##
-Windows Phone 8 implementation currently doesn't support encode functionality.
-
-## BlackBerry 10 quirks
-BlackBerry 10 implementation currently doesn't support encode functionality.
-Cancelling a scan on BlackBerry 10 is done by touching the screen.
-
-## Thanks on Github ##
-
-So many -- check out the original [iOS](https://github.com/phonegap/phonegap-plugins/tree/DEPRECATED/iOS/BarcodeScanner), [Android](https://github.com/phonegap/phonegap-plugins/tree/DEPRECATED/Android/BarcodeScanner) and
-[BlackBerry 10](https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10-Cordova/BarcodeScanner) repos.
-
-## Licence ##
-
-The MIT License
-
-Copyright (c) 2010 Matt Kane
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/plugins/phonegap-plugin-barcodescanner/hooks/windows/check-arch.js b/plugins/phonegap-plugin-barcodescanner/hooks/windows/check-arch.js
deleted file mode 100644
index 3ae6660..0000000
--- a/plugins/phonegap-plugin-barcodescanner/hooks/windows/check-arch.js
+++ /dev/null
@@ -1,52 +0,0 @@
-module.exports = function(ctx) {
- if (ctx.opts && ctx.opts.platforms && ctx.opts.platforms.indexOf('windows') > -1
- && ctx.opts.options) {
- var path = require('path');
- var shell = ctx.requireCordovaModule('shelljs');
- var nopt = ctx.requireCordovaModule('nopt');
-
- // parse and validate args
- var args = nopt({
- 'archs': [String],
- 'appx': String,
- 'phone': Boolean,
- 'win': Boolean,
- 'bundle': Boolean,
- 'packageCertificateKeyFile': String,
- 'packageThumbprint': String,
- 'publisherId': String,
- 'buildConfig': String
- }, {}, ctx.opts.options.argv, 0);
-
- // Check if --appx flag is passed so that we have a project build version override:
- var isWin10 = args.appx && args.appx.toLowerCase() === 'uap';
-
- // Else check "windows-target-version" preference:
- if (!isWin10) {
- var configXml = shell.ls(path.join(ctx.opts.projectRoot, 'config.xml'))[0];
-
- var reTargetVersion = //i;
- var targetVersion = shell.grep(reTargetVersion, configXml);
-
- var result = reTargetVersion.exec(targetVersion);
- if (result !== null) {
- var match = result[1];
- isWin10 = parseInt(match.split('.'), 10) > 8;
- }
- }
-
- // Non-AnyCPU arch is required for Windows 10 (UWP) projects only:
- if (isWin10) {
- var rawArchs = ctx.opts.options.archs || args.archs;
- var archs = rawArchs ? rawArchs.split(' ') : [];
-
- // Avoid "anycpu" arch:
- if (archs.length === 0 || archs.some(function (item) {
- return item.toLowerCase() === 'anycpu';
- })) {
- throw new Error('You must specify an architecture to include the proper ZXing library version.'
- + '\nUse \'cordova run windows -- --arch="x64"\' or \'cordova run windows -- --arch="arm" --phone --device\' for example.');
- }
- }
- }
-}
diff --git a/plugins/phonegap-plugin-barcodescanner/package.json b/plugins/phonegap-plugin-barcodescanner/package.json
deleted file mode 100644
index e42593c..0000000
--- a/plugins/phonegap-plugin-barcodescanner/package.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "name": "phonegap-plugin-barcodescanner",
- "version": "6.0.1",
- "description": "You can use the BarcodeScanner plugin to scan different types of barcodes (using the device's camera) and get the metadata encoded in them for processing within your application.",
- "cordova": {
- "id": "phonegap-plugin-barcodescanner",
- "platforms": [
- "ios",
- "android",
- "windows",
- "wp8",
- "blackberry10",
- "browser"
- ]
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/phonegap/phonegap-plugin-barcodescanner.git"
- },
- "keywords": [
- "ecosystem:cordova",
- "ecosystem:phonegap",
- "cordova-ios",
- "cordova-android",
- "cordova-windows",
- "cordova-wp8",
- "cordova-blackberry10",
- "cordova-browser",
- "cordova:plugin"
- ],
- "engines": [
- {
- "name": "cordova",
- "version": ">=3.0.0"
- }
- ],
- "author": "Adobe PhoneGap Team",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/phonegap/phonegap-plugin-barcodescanner/issues"
- },
- "homepage": "https://github.com/phonegap/phonegap-plugin-barcodescanner#readme"
-}
diff --git a/plugins/phonegap-plugin-barcodescanner/plugin.xml b/plugins/phonegap-plugin-barcodescanner/plugin.xml
deleted file mode 100644
index 6459857..0000000
--- a/plugins/phonegap-plugin-barcodescanner/plugin.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
- BarcodeScanner
- You can use the BarcodeScanner plugin to scan different types of barcodes (using the device's camera) and get the metadata encoded in them for processing within your application.
- MIT
-
- https://github.com/phonegap/phonegap-plugin-barcodescanner
- https://github.com/phonegap/phonegap-plugin-barcodescanner/issues
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- use_camera
-
-
-
-
diff --git a/plugins/phonegap-plugin-barcodescanner/src/android/README.md b/plugins/phonegap-plugin-barcodescanner/src/android/README.md
deleted file mode 100644
index 537afd2..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/android/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The Android .aar sources are [here](https://github.com/EddyVerbruggen/barcodescanner-lib-aar).
\ No newline at end of file
diff --git a/plugins/phonegap-plugin-barcodescanner/src/android/barcodescanner-release-2.0.1.aar b/plugins/phonegap-plugin-barcodescanner/src/android/barcodescanner-release-2.0.1.aar
deleted file mode 100644
index abea644..0000000
Binary files a/plugins/phonegap-plugin-barcodescanner/src/android/barcodescanner-release-2.0.1.aar and /dev/null differ
diff --git a/plugins/phonegap-plugin-barcodescanner/src/android/barcodescanner.gradle b/plugins/phonegap-plugin-barcodescanner/src/android/barcodescanner.gradle
deleted file mode 100644
index ff2b44d..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/android/barcodescanner.gradle
+++ /dev/null
@@ -1,20 +0,0 @@
-ext.cdvMinSdkVersion = 15
-
-repositories{
- jcenter()
- flatDir{
- dirs 'libs'
- }
-}
-
-dependencies {
- compile 'com.android.support:support-v4:+'
- compile(name:'barcodescanner', ext:'aar')
-}
-
-android {
- packagingOptions {
- exclude 'META-INF/NOTICE'
- exclude 'META-INF/LICENSE'
- }
-}
\ No newline at end of file
diff --git a/plugins/phonegap-plugin-barcodescanner/src/android/com/phonegap/plugins/barcodescanner/BarcodeScanner.java b/plugins/phonegap-plugin-barcodescanner/src/android/com/phonegap/plugins/barcodescanner/BarcodeScanner.java
deleted file mode 100644
index f2d4234..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/android/com/phonegap/plugins/barcodescanner/BarcodeScanner.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/**
- * PhoneGap is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- *
- * Copyright (c) Matt Kane 2010
- * Copyright (c) 2011, IBM Corporation
- * Copyright (c) 2013, Maciej Nux Jaros
- */
-package com.phonegap.plugins.barcodescanner;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import android.Manifest;
-import android.app.Activity;
-import android.content.Intent;
-import android.util.Log;
-import android.content.pm.PackageManager;
-
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.PluginResult;
-import org.apache.cordova.PermissionHelper;
-
-import com.google.zxing.client.android.Intents;
-
-/**
- * This calls out to the ZXing barcode reader and returns the result.
- *
- * @sa https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaPlugin.java
- */
-public class BarcodeScanner extends CordovaPlugin {
- public static final int REQUEST_CODE = 0x0ba7c0de;
-
- private static final String SCAN = "scan";
- private static final String ENCODE = "encode";
- private static final String CANCELLED = "cancelled";
- private static final String FORMAT = "format";
- private static final String TEXT = "text";
- private static final String DATA = "data";
- private static final String TYPE = "type";
- private static final String PREFER_FRONTCAMERA = "preferFrontCamera";
- private static final String ORIENTATION = "orientation";
- private static final String SHOW_FLIP_CAMERA_BUTTON = "showFlipCameraButton";
- private static final String FORMATS = "formats";
- private static final String PROMPT = "prompt";
- private static final String SCAN_INTENT = "com.google.zxing.client.android.SCAN";
- private static final String ENCODE_DATA = "ENCODE_DATA";
- private static final String ENCODE_TYPE = "ENCODE_TYPE";
- private static final String ENCODE_INTENT = "com.phonegap.plugins.barcodescanner.ENCODE";
- private static final String TEXT_TYPE = "TEXT_TYPE";
- private static final String EMAIL_TYPE = "EMAIL_TYPE";
- private static final String PHONE_TYPE = "PHONE_TYPE";
- private static final String SMS_TYPE = "SMS_TYPE";
-
- private static final String LOG_TAG = "BarcodeScanner";
-
- private String [] permissions = { Manifest.permission.CAMERA };
-
- private JSONArray requestArgs;
- private CallbackContext callbackContext;
-
- /**
- * Constructor.
- */
- public BarcodeScanner() {
- }
-
- /**
- * Executes the request.
- *
- * This method is called from the WebView thread. To do a non-trivial amount of work, use:
- * cordova.getThreadPool().execute(runnable);
- *
- * To run on the UI thread, use:
- * cordova.getActivity().runOnUiThread(runnable);
- *
- * @param action The action to execute.
- * @param args The exec() arguments.
- * @param callbackContext The callback context used when calling back into JavaScript.
- * @return Whether the action was valid.
- *
- * @sa https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaPlugin.java
- */
- @Override
- public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {
- this.callbackContext = callbackContext;
- this.requestArgs = args;
-
- if (action.equals(ENCODE)) {
- JSONObject obj = args.optJSONObject(0);
- if (obj != null) {
- String type = obj.optString(TYPE);
- String data = obj.optString(DATA);
-
- // If the type is null then force the type to text
- if (type == null) {
- type = TEXT_TYPE;
- }
-
- if (data == null) {
- callbackContext.error("User did not specify data to encode");
- return true;
- }
-
- encode(type, data);
- } else {
- callbackContext.error("User did not specify data to encode");
- return true;
- }
- } else if (action.equals(SCAN)) {
-
- //android permission auto add
- if(!hasPermisssion()) {
- requestPermissions(0);
- } else {
- scan(args);
- }
- } else {
- return false;
- }
- return true;
- }
-
- /**
- * Starts an intent to scan and decode a barcode.
- */
- public void scan(final JSONArray args) {
-
- final CordovaPlugin that = this;
-
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
-
- Intent intentScan = new Intent(SCAN_INTENT);
- intentScan.addCategory(Intent.CATEGORY_DEFAULT);
-
- // add config as intent extras
- if (args.length() > 0) {
-
- JSONObject obj;
- JSONArray names;
- String key;
- Object value;
-
- for (int i = 0; i < args.length(); i++) {
-
- try {
- obj = args.getJSONObject(i);
- } catch (JSONException e) {
- Log.i("CordovaLog", e.getLocalizedMessage());
- continue;
- }
-
- names = obj.names();
- for (int j = 0; j < names.length(); j++) {
- try {
- key = names.getString(j);
- value = obj.get(key);
-
- if (value instanceof Integer) {
- intentScan.putExtra(key, (Integer) value);
- } else if (value instanceof String) {
- intentScan.putExtra(key, (String) value);
- }
-
- } catch (JSONException e) {
- Log.i("CordovaLog", e.getLocalizedMessage());
- }
- }
-
- intentScan.putExtra(Intents.Scan.CAMERA_ID, obj.optBoolean(PREFER_FRONTCAMERA, false) ? 1 : 0);
- intentScan.putExtra(Intents.Scan.SHOW_FLIP_CAMERA_BUTTON, obj.optBoolean(SHOW_FLIP_CAMERA_BUTTON, false));
- if (obj.has(FORMATS)) {
- intentScan.putExtra(Intents.Scan.FORMATS, obj.optString(FORMATS));
- }
- if (obj.has(PROMPT)) {
- intentScan.putExtra(Intents.Scan.PROMPT_MESSAGE, obj.optString(PROMPT));
- }
- if (obj.has(ORIENTATION)) {
- intentScan.putExtra(Intents.Scan.ORIENTATION_LOCK, obj.optString(ORIENTATION));
- }
- }
-
- }
-
- // avoid calling other phonegap apps
- intentScan.setPackage(that.cordova.getActivity().getApplicationContext().getPackageName());
-
- that.cordova.startActivityForResult(that, intentScan, REQUEST_CODE);
- }
- });
- }
-
- /**
- * Called when the barcode scanner intent completes.
- *
- * @param requestCode The request code originally supplied to startActivityForResult(),
- * allowing you to identify who this result came from.
- * @param resultCode The integer result code returned by the child activity through its setResult().
- * @param intent An Intent, which can return result data to the caller (various data can be attached to Intent "extras").
- */
- @Override
- public void onActivityResult(int requestCode, int resultCode, Intent intent) {
- if (requestCode == REQUEST_CODE && this.callbackContext != null) {
- if (resultCode == Activity.RESULT_OK) {
- JSONObject obj = new JSONObject();
- try {
- obj.put(TEXT, intent.getStringExtra("SCAN_RESULT"));
- obj.put(FORMAT, intent.getStringExtra("SCAN_RESULT_FORMAT"));
- obj.put(CANCELLED, false);
- } catch (JSONException e) {
- Log.d(LOG_TAG, "This should never happen");
- }
- //this.success(new PluginResult(PluginResult.Status.OK, obj), this.callback);
- this.callbackContext.success(obj);
- } else if (resultCode == Activity.RESULT_CANCELED) {
- JSONObject obj = new JSONObject();
- try {
- obj.put(TEXT, "");
- obj.put(FORMAT, "");
- obj.put(CANCELLED, true);
- } catch (JSONException e) {
- Log.d(LOG_TAG, "This should never happen");
- }
- //this.success(new PluginResult(PluginResult.Status.OK, obj), this.callback);
- this.callbackContext.success(obj);
- } else {
- //this.error(new PluginResult(PluginResult.Status.ERROR), this.callback);
- this.callbackContext.error("Unexpected error");
- }
- }
- }
-
- /**
- * Initiates a barcode encode.
- *
- * @param type Endoiding type.
- * @param data The data to encode in the bar code.
- */
- public void encode(String type, String data) {
- Intent intentEncode = new Intent(ENCODE_INTENT);
- intentEncode.putExtra(ENCODE_TYPE, type);
- intentEncode.putExtra(ENCODE_DATA, data);
- // avoid calling other phonegap apps
- intentEncode.setPackage(this.cordova.getActivity().getApplicationContext().getPackageName());
-
- this.cordova.getActivity().startActivity(intentEncode);
- }
-
- /**
- * check application's permissions
- */
- public boolean hasPermisssion() {
- for(String p : permissions)
- {
- if(!PermissionHelper.hasPermission(this, p))
- {
- return false;
- }
- }
- return true;
- }
-
- /**
- * We override this so that we can access the permissions variable, which no longer exists in
- * the parent class, since we can't initialize it reliably in the constructor!
- *
- * @param requestCode The code to get request action
- */
- public void requestPermissions(int requestCode)
- {
- PermissionHelper.requestPermissions(this, requestCode, permissions);
- }
-
- /**
- * processes the result of permission request
- *
- * @param requestCode The code to get request action
- * @param permissions The collection of permissions
- * @param grantResults The result of grant
- */
- public void onRequestPermissionResult(int requestCode, String[] permissions,
- int[] grantResults) throws JSONException
- {
- PluginResult result;
- for (int r : grantResults) {
- if (r == PackageManager.PERMISSION_DENIED) {
- Log.d(LOG_TAG, "Permission Denied!");
- result = new PluginResult(PluginResult.Status.ILLEGAL_ACCESS_EXCEPTION);
- this.callbackContext.sendPluginResult(result);
- return;
- }
- }
-
- switch(requestCode)
- {
- case 0:
- scan(this.requestArgs);
- break;
- }
- }
-
-}
diff --git a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/LICENSE b/plugins/phonegap-plugin-barcodescanner/src/blackberry10/LICENSE
deleted file mode 100644
index 680566f..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/LICENSE
+++ /dev/null
@@ -1,703 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--------------------------------------------------------
-*JNEXT (v1.0.8.3)
-
- MOZILLA PUBLIC LICENSE
- Version 1.1
-
- ---------------
-
-1. Definitions.
-
- 1.0.1. "Commercial Use" means distribution or otherwise making the
- Covered Code available to a third party.
-
- 1.1. "Contributor" means each entity that creates or contributes to
- the creation of Modifications.
-
- 1.2. "Contributor Version" means the combination of the Original
- Code, prior Modifications used by a Contributor, and the Modifications
- made by that particular Contributor.
-
- 1.3. "Covered Code" means the Original Code or Modifications or the
- combination of the Original Code and Modifications, in each case
- including portions thereof.
-
- 1.4. "Electronic Distribution Mechanism" means a mechanism generally
- accepted in the software development community for the electronic
- transfer of data.
-
- 1.5. "Executable" means Covered Code in any form other than Source
- Code.
-
- 1.6. "Initial Developer" means the individual or entity identified
- as the Initial Developer in the Source Code notice required by Exhibit
- A.
-
- 1.7. "Larger Work" means a work which combines Covered Code or
- portions thereof with code not governed by the terms of this License.
-
- 1.8. "License" means this document.
-
- 1.8.1. "Licensable" means having the right to grant, to the maximum
- extent possible, whether at the time of the initial grant or
- subsequently acquired, any and all of the rights conveyed herein.
-
- 1.9. "Modifications" means any addition to or deletion from the
- substance or structure of either the Original Code or any previous
- Modifications. When Covered Code is released as a series of files, a
- Modification is:
- A. Any addition to or deletion from the contents of a file
- containing Original Code or previous Modifications.
-
- B. Any new file that contains any part of the Original Code or
- previous Modifications.
-
- 1.10. "Original Code" means Source Code of computer software code
- which is described in the Source Code notice required by Exhibit A as
- Original Code, and which, at the time of its release under this
- License is not already Covered Code governed by this License.
-
- 1.10.1. "Patent Claims" means any patent claim(s), now owned or
- hereafter acquired, including without limitation, method, process,
- and apparatus claims, in any patent Licensable by grantor.
-
- 1.11. "Source Code" means the preferred form of the Covered Code for
- making modifications to it, including all modules it contains, plus
- any associated interface definition files, scripts used to control
- compilation and installation of an Executable, or source code
- differential comparisons against either the Original Code or another
- well known, available Covered Code of the Contributor's choice. The
- Source Code can be in a compressed or archival form, provided the
- appropriate decompression or de-archiving software is widely available
- for no charge.
-
- 1.12. "You" (or "Your") means an individual or a legal entity
- exercising rights under, and complying with all of the terms of, this
- License or a future version of this License issued under Section 6.1.
- For legal entities, "You" includes any entity which controls, is
- controlled by, or is under common control with You. For purposes of
- this definition, "control" means (a) the power, direct or indirect,
- to cause the direction or management of such entity, whether by
- contract or otherwise, or (b) ownership of more than fifty percent
- (50%) of the outstanding shares or beneficial ownership of such
- entity.
-
-2. Source Code License.
-
- 2.1. The Initial Developer Grant.
- The Initial Developer hereby grants You a world-wide, royalty-free,
- non-exclusive license, subject to third party intellectual property
- claims:
- (a) under intellectual property rights (other than patent or
- trademark) Licensable by Initial Developer to use, reproduce,
- modify, display, perform, sublicense and distribute the Original
- Code (or portions thereof) with or without Modifications, and/or
- as part of a Larger Work; and
-
- (b) under Patents Claims infringed by the making, using or
- selling of Original Code, to make, have made, use, practice,
- sell, and offer for sale, and/or otherwise dispose of the
- Original Code (or portions thereof).
-
- (c) the licenses granted in this Section 2.1(a) and (b) are
- effective on the date Initial Developer first distributes
- Original Code under the terms of this License.
-
- (d) Notwithstanding Section 2.1(b) above, no patent license is
- granted: 1) for code that You delete from the Original Code; 2)
- separate from the Original Code; or 3) for infringements caused
- by: i) the modification of the Original Code or ii) the
- combination of the Original Code with other software or devices.
-
- 2.2. Contributor Grant.
- Subject to third party intellectual property claims, each Contributor
- hereby grants You a world-wide, royalty-free, non-exclusive license
-
- (a) under intellectual property rights (other than patent or
- trademark) Licensable by Contributor, to use, reproduce, modify,
- display, perform, sublicense and distribute the Modifications
- created by such Contributor (or portions thereof) either on an
- unmodified basis, with other Modifications, as Covered Code
- and/or as part of a Larger Work; and
-
- (b) under Patent Claims infringed by the making, using, or
- selling of Modifications made by that Contributor either alone
- and/or in combination with its Contributor Version (or portions
- of such combination), to make, use, sell, offer for sale, have
- made, and/or otherwise dispose of: 1) Modifications made by that
- Contributor (or portions thereof); and 2) the combination of
- Modifications made by that Contributor with its Contributor
- Version (or portions of such combination).
-
- (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
- effective on the date Contributor first makes Commercial Use of
- the Covered Code.
-
- (d) Notwithstanding Section 2.2(b) above, no patent license is
- granted: 1) for any code that Contributor has deleted from the
- Contributor Version; 2) separate from the Contributor Version;
- 3) for infringements caused by: i) third party modifications of
- Contributor Version or ii) the combination of Modifications made
- by that Contributor with other software (except as part of the
- Contributor Version) or other devices; or 4) under Patent Claims
- infringed by Covered Code in the absence of Modifications made by
- that Contributor.
-
-3. Distribution Obligations.
-
- 3.1. Application of License.
- The Modifications which You create or to which You contribute are
- governed by the terms of this License, including without limitation
- Section 2.2. The Source Code version of Covered Code may be
- distributed only under the terms of this License or a future version
- of this License released under Section 6.1, and You must include a
- copy of this License with every copy of the Source Code You
- distribute. You may not offer or impose any terms on any Source Code
- version that alters or restricts the applicable version of this
- License or the recipients' rights hereunder. However, You may include
- an additional document offering the additional rights described in
- Section 3.5.
-
- 3.2. Availability of Source Code.
- Any Modification which You create or to which You contribute must be
- made available in Source Code form under the terms of this License
- either on the same media as an Executable version or via an accepted
- Electronic Distribution Mechanism to anyone to whom you made an
- Executable version available; and if made available via Electronic
- Distribution Mechanism, must remain available for at least twelve (12)
- months after the date it initially became available, or at least six
- (6) months after a subsequent version of that particular Modification
- has been made available to such recipients. You are responsible for
- ensuring that the Source Code version remains available even if the
- Electronic Distribution Mechanism is maintained by a third party.
-
- 3.3. Description of Modifications.
- You must cause all Covered Code to which You contribute to contain a
- file documenting the changes You made to create that Covered Code and
- the date of any change. You must include a prominent statement that
- the Modification is derived, directly or indirectly, from Original
- Code provided by the Initial Developer and including the name of the
- Initial Developer in (a) the Source Code, and (b) in any notice in an
- Executable version or related documentation in which You describe the
- origin or ownership of the Covered Code.
-
- 3.4. Intellectual Property Matters
- (a) Third Party Claims.
- If Contributor has knowledge that a license under a third party's
- intellectual property rights is required to exercise the rights
- granted by such Contributor under Sections 2.1 or 2.2,
- Contributor must include a text file with the Source Code
- distribution titled "LEGAL" which describes the claim and the
- party making the claim in sufficient detail that a recipient will
- know whom to contact. If Contributor obtains such knowledge after
- the Modification is made available as described in Section 3.2,
- Contributor shall promptly modify the LEGAL file in all copies
- Contributor makes available thereafter and shall take other steps
- (such as notifying appropriate mailing lists or newsgroups)
- reasonably calculated to inform those who received the Covered
- Code that new knowledge has been obtained.
-
- (b) Contributor APIs.
- If Contributor's Modifications include an application programming
- interface and Contributor has knowledge of patent licenses which
- are reasonably necessary to implement that API, Contributor must
- also include this information in the LEGAL file.
-
- (c) Representations.
- Contributor represents that, except as disclosed pursuant to
- Section 3.4(a) above, Contributor believes that Contributor's
- Modifications are Contributor's original creation(s) and/or
- Contributor has sufficient rights to grant the rights conveyed by
- this License.
-
- 3.5. Required Notices.
- You must duplicate the notice in Exhibit A in each file of the Source
- Code. If it is not possible to put such notice in a particular Source
- Code file due to its structure, then You must include such notice in a
- location (such as a relevant directory) where a user would be likely
- to look for such a notice. If You created one or more Modification(s)
- You may add your name as a Contributor to the notice described in
- Exhibit A. You must also duplicate this License in any documentation
- for the Source Code where You describe recipients' rights or ownership
- rights relating to Covered Code. You may choose to offer, and to
- charge a fee for, warranty, support, indemnity or liability
- obligations to one or more recipients of Covered Code. However, You
- may do so only on Your own behalf, and not on behalf of the Initial
- Developer or any Contributor. You must make it absolutely clear than
- any such warranty, support, indemnity or liability obligation is
- offered by You alone, and You hereby agree to indemnify the Initial
- Developer and every Contributor for any liability incurred by the
- Initial Developer or such Contributor as a result of warranty,
- support, indemnity or liability terms You offer.
-
- 3.6. Distribution of Executable Versions.
- You may distribute Covered Code in Executable form only if the
- requirements of Section 3.1-3.5 have been met for that Covered Code,
- and if You include a notice stating that the Source Code version of
- the Covered Code is available under the terms of this License,
- including a description of how and where You have fulfilled the
- obligations of Section 3.2. The notice must be conspicuously included
- in any notice in an Executable version, related documentation or
- collateral in which You describe recipients' rights relating to the
- Covered Code. You may distribute the Executable version of Covered
- Code or ownership rights under a license of Your choice, which may
- contain terms different from this License, provided that You are in
- compliance with the terms of this License and that the license for the
- Executable version does not attempt to limit or alter the recipient's
- rights in the Source Code version from the rights set forth in this
- License. If You distribute the Executable version under a different
- license You must make it absolutely clear that any terms which differ
- from this License are offered by You alone, not by the Initial
- Developer or any Contributor. You hereby agree to indemnify the
- Initial Developer and every Contributor for any liability incurred by
- the Initial Developer or such Contributor as a result of any such
- terms You offer.
-
- 3.7. Larger Works.
- You may create a Larger Work by combining Covered Code with other code
- not governed by the terms of this License and distribute the Larger
- Work as a single product. In such a case, You must make sure the
- requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
- If it is impossible for You to comply with any of the terms of this
- License with respect to some or all of the Covered Code due to
- statute, judicial order, or regulation then You must: (a) comply with
- the terms of this License to the maximum extent possible; and (b)
- describe the limitations and the code they affect. Such description
- must be included in the LEGAL file described in Section 3.4 and must
- be included with all distributions of the Source Code. Except to the
- extent prohibited by statute or regulation, such description must be
- sufficiently detailed for a recipient of ordinary skill to be able to
- understand it.
-
-5. Application of this License.
-
- This License applies to code to which the Initial Developer has
- attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
- 6.1. New Versions.
- Netscape Communications Corporation ("Netscape") may publish revised
- and/or new versions of the License from time to time. Each version
- will be given a distinguishing version number.
-
- 6.2. Effect of New Versions.
- Once Covered Code has been published under a particular version of the
- License, You may always continue to use it under the terms of that
- version. You may also choose to use such Covered Code under the terms
- of any subsequent version of the License published by Netscape. No one
- other than Netscape has the right to modify the terms applicable to
- Covered Code created under this License.
-
- 6.3. Derivative Works.
- If You create or use a modified version of this License (which you may
- only do in order to apply it to code which is not already Covered Code
- governed by this License), You must (a) rename Your license so that
- the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
- "MPL", "NPL" or any confusingly similar phrase do not appear in your
- license (except to note that your license differs from this License)
- and (b) otherwise make it clear that Your version of the license
- contains terms which differ from the Mozilla Public License and
- Netscape Public License. (Filling in the name of the Initial
- Developer, Original Code or Contributor in the notice described in
- Exhibit A shall not of themselves be deemed to be modifications of
- this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
- COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
- DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
- THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
- IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
- YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
- COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
- OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
- ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
- 8.1. This License and the rights granted hereunder will terminate
- automatically if You fail to comply with terms herein and fail to cure
- such breach within 30 days of becoming aware of the breach. All
- sublicenses to the Covered Code which are properly granted shall
- survive any termination of this License. Provisions which, by their
- nature, must remain in effect beyond the termination of this License
- shall survive.
-
- 8.2. If You initiate litigation by asserting a patent infringement
- claim (excluding declatory judgment actions) against Initial Developer
- or a Contributor (the Initial Developer or Contributor against whom
- You file such action is referred to as "Participant") alleging that:
-
- (a) such Participant's Contributor Version directly or indirectly
- infringes any patent, then any and all rights granted by such
- Participant to You under Sections 2.1 and/or 2.2 of this License
- shall, upon 60 days notice from Participant terminate prospectively,
- unless if within 60 days after receipt of notice You either: (i)
- agree in writing to pay Participant a mutually agreeable reasonable
- royalty for Your past and future use of Modifications made by such
- Participant, or (ii) withdraw Your litigation claim with respect to
- the Contributor Version against such Participant. If within 60 days
- of notice, a reasonable royalty and payment arrangement are not
- mutually agreed upon in writing by the parties or the litigation claim
- is not withdrawn, the rights granted by Participant to You under
- Sections 2.1 and/or 2.2 automatically terminate at the expiration of
- the 60 day notice period specified above.
-
- (b) any software, hardware, or device, other than such Participant's
- Contributor Version, directly or indirectly infringes any patent, then
- any rights granted to You by such Participant under Sections 2.1(b)
- and 2.2(b) are revoked effective as of the date You first made, used,
- sold, distributed, or had made, Modifications made by that
- Participant.
-
- 8.3. If You assert a patent infringement claim against Participant
- alleging that such Participant's Contributor Version directly or
- indirectly infringes any patent where such claim is resolved (such as
- by license or settlement) prior to the initiation of patent
- infringement litigation, then the reasonable value of the licenses
- granted by such Participant under Sections 2.1 or 2.2 shall be taken
- into account in determining the amount or value of any payment or
- license.
-
- 8.4. In the event of termination under Sections 8.1 or 8.2 above,
- all end user license agreements (excluding distributors and resellers)
- which have been validly granted by You or any distributor hereunder
- prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
- UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
- (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
- DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
- OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
- ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
- CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
- WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
- COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
- INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
- LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
- RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
- PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
- EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
- THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
- The Covered Code is a "commercial item," as that term is defined in
- 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
- software" and "commercial computer software documentation," as such
- terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
- C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
- all U.S. Government End Users acquire Covered Code with only those
- rights set forth herein.
-
-11. MISCELLANEOUS.
-
- This License represents the complete agreement concerning subject
- matter hereof. If any provision of this License is held to be
- unenforceable, such provision shall be reformed only to the extent
- necessary to make it enforceable. This License shall be governed by
- California law provisions (except to the extent applicable law, if
- any, provides otherwise), excluding its conflict-of-law provisions.
- With respect to disputes in which at least one party is a citizen of,
- or an entity chartered or registered to do business in the United
- States of America, any litigation relating to this License shall be
- subject to the jurisdiction of the Federal Courts of the Northern
- District of California, with venue lying in Santa Clara County,
- California, with the losing party responsible for costs, including
- without limitation, court costs and reasonable attorneys' fees and
- expenses. The application of the United Nations Convention on
- Contracts for the International Sale of Goods is expressly excluded.
- Any law or regulation which provides that the language of a contract
- shall be construed against the drafter shall not apply to this
- License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
- As between Initial Developer and the Contributors, each party is
- responsible for claims and damages arising, directly or indirectly,
- out of its utilization of rights under this License and You agree to
- work with Initial Developer and Contributors to distribute such
- responsibility on an equitable basis. Nothing herein is intended or
- shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
- Initial Developer may designate portions of the Covered Code as
- "Multiple-Licensed". "Multiple-Licensed" means that the Initial
- Developer permits you to utilize portions of the Covered Code under
- Your choice of the NPL or the alternative licenses, if any, specified
- by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A -Mozilla Public License.
-
- ``The contents of this file are subject to the Mozilla Public License
- Version 1.1 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- License for the specific language governing rights and limitations
- under the License.
-
- The Original Code is ______________________________________.
-
- The Initial Developer of the Original Code is ________________________.
- Portions created by ______________________ are Copyright (C) ______
- _______________________. All Rights Reserved.
-
- Contributor(s): ______________________________________.
-
- Alternatively, the contents of this file may be used under the terms
- of the _____ license (the "[___] License"), in which case the
- provisions of [______] License are applicable instead of those
- above. If you wish to allow use of your version of this file only
- under the terms of the [____] License and not to allow others to use
- your version of this file under the MPL, indicate your decision by
- deleting the provisions above and replace them with the notice and
- other provisions required by the [___] License. If you do not delete
- the provisions above, a recipient may use your version of this file
- under either the MPL or the [___] License."
-
- [NOTE: The text of this Exhibit A may differ slightly from the text of
- the notices in the Source Code files of the Original Code. You should
- use the text of this Exhibit A rather than the text found in the
- Original Code Source Code for Your Modifications.]
-
--------------------------------------------------------
-
-* Tokenizer
-/************************************************************************
-The zlib/libpng License
-
-Copyright (c) 2006 Joerg Wiedenmann
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from
-the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented;
- you must not claim that you wrote the original software.
- If you use this software in a product, an acknowledgment
- in the product documentation would be appreciated but is
- not required.
-
-2. Altered source versions must be plainly marked as such,
- and must not be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source distribution.
-
-***********************************************************************/
\ No newline at end of file
diff --git a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/index.js b/plugins/phonegap-plugin-barcodescanner/src/blackberry10/index.js
deleted file mode 100644
index e263f07..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/index.js
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
-* Copyright 2013-2015 BlackBerry Limited.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-var barcodescanner,
- resultObjs = {},
- readCallback,
- _utils = require("../../lib/utils"),
- _qr = require('plugin/BarcodeScanner/qrcode.js');
-
-const SMS_URI_ONE = "smsto:",
- SMS_URI_TWO = "sms:",
- EMAIL_URI = "mailto:",
- PHONE_URI = "tel:+1",
- SMS_TYPE = "SMS_TYPE",
- PHONE_TYPE = "PHONE_TYPE",
- EMAIL_TYPE = "EMAIL_TYPE",
- TEXT_TYPE = "TEXT_TYPE";
-
-module.exports = {
-
- // methods to start and stop scanning
- scan: function (success, fail, args, env) {
- var result = new PluginResult(args, env);
- resultObjs[result.callbackId] = result;
- readCallback = result.callbackId;
- var views = qnx.webplatform.getWebViews();
- var handle = null;
- var group = null;
- var z = -1;
- for (var i = 0; i < views.length; i++) {
- if (views[i].visible && views[i].zOrder > z){
- z = views[i].zOrder;
- group = views[i].windowGroup;
- handle = views[i].jsScreenWindowHandle;
- }
- }
- if (handle !== null) {
- var values = { group: group, handle: handle };
- barcodescanner.getInstance().startRead(result.callbackId, values);
- result.noResult(true);
- } else {
- result.error("Failed to find window handle", false);
- }
- },
-
- /*
- Method for barcode encoding. Returns base 64 image URI
- Currently only creates QRcodes
- */
- encode: function (success, fail, args, env) {
-
- var result = new PluginResult(args, env);
- values = decodeURIComponent(args[0]);
- values = JSON.parse(values);
- data = values["data"];
- type = values["type"];
-
- if(data == "" || data == undefined){
- result.error("Data to be encoded was not specified", false);
- return;
- }
- if(type == "" || type == undefined){
- type = TEXT_TYPE;
- }
-
- if(type == SMS_TYPE){
- var check_one = data.substring(0,6).toLowerCase();
- var check_two = data.substring(0,4).toLowerCase();
- if(!(check_one == SMS_URI_ONE || check_two == SMS_URI_TWO)){
- data = SMS_URI_ONE+data;
- }
- }else if(type == EMAIL_TYPE){
- var check = data.substring(0,7).toLowerCase();
- if(check != EMAIL_URI){
- data = EMAIL_URI+data;
- }
- }else if(type == PHONE_TYPE){
- var check = data.substring(0,4).toLowerCase();
- if(check != PHONE_URI){
- data = PHONE_URI+data;
- }
- }
-
- console.log("Type: "+type + " Data: " + data);
-
- //Make QRcode using qrcode.js
- var bdiv = document.createElement('div');
- var options = {
- text: data,
- width: 256,
- height: 256,
- colorDark : "#000000",
- colorLight : "#ffffff",
- };
-
- var imageURI = _qr.makeQRcode(bdiv, options);
-
- try{
- result.ok(imageURI,false);
- }catch(e){
- result.error("Failed to encode barcode", false);
- }
- }
-};
-
-
-JNEXT.BarcodeScanner = function () {
- var self = this,
- hasInstance = false;
-
- self.getId = function () {
- return self.m_id;
- };
-
- self.init = function () {
- if (!JNEXT.require("libBarcodeScanner")) {
- return false;
- }
-
- self.m_id = JNEXT.createObject("libBarcodeScanner.BarcodeScannerJS");
-
- if (self.m_id === "") {
- return false;
- }
-
- JNEXT.registerEvents(self);
- };
-
- // ************************
- // Enter your methods here
- // ************************
-
- // Fired by the Event framework (used by asynchronous callbacks)
-
- self.onEvent = function (strData) {
- var arData = strData.split(" "),
- callbackId = arData[0],
- receivedEvent = arData[1],
- data = arData[2],
- result = resultObjs[callbackId],
- events = ["community.barcodescanner.codefound.native",
- "community.barcodescanner.errorfound.native",
- "community.barcodescanner.started.native",
- "community.barcodescanner.ended.native"];
-
- // Restructures results when codefound has spaces
- if(arData.length > 3){
- var i;
- for(i=3; i
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/.settings/com.qnx.tools.ide.core.prefs b/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/.settings/com.qnx.tools.ide.core.prefs
deleted file mode 100644
index 5227f00..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/.settings/com.qnx.tools.ide.core.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-QNX_CURRENT_INSTALL=BlackBerry Native SDK 10.2
-eclipse.preferences.version=1
diff --git a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/device/.gitignore b/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/device/.gitignore
deleted file mode 100644
index 1209638..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/device/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/src
-/public
diff --git a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/device/libBarcodeScanner.so b/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/device/libBarcodeScanner.so
deleted file mode 100644
index bd8a3af..0000000
Binary files a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/device/libBarcodeScanner.so and /dev/null differ
diff --git a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/autolink.h b/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/autolink.h
deleted file mode 100644
index 37c9258..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/autolink.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef JSON_AUTOLINK_H_INCLUDED
-# define JSON_AUTOLINK_H_INCLUDED
-
-# include "config.h"
-
-# ifdef JSON_IN_CPPTL
-# include
-# endif
-
-# if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) && !defined(JSON_IN_CPPTL)
-# define CPPTL_AUTOLINK_NAME "json"
-# undef CPPTL_AUTOLINK_DLL
-# ifdef JSON_DLL
-# define CPPTL_AUTOLINK_DLL
-# endif
-# include "autolink.h"
-# endif
-
-#endif // JSON_AUTOLINK_H_INCLUDED
diff --git a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/config.h b/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/config.h
deleted file mode 100644
index 5d334cb..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/config.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef JSON_CONFIG_H_INCLUDED
-# define JSON_CONFIG_H_INCLUDED
-
-/// If defined, indicates that json library is embedded in CppTL library.
-//# define JSON_IN_CPPTL 1
-
-/// If defined, indicates that json may leverage CppTL library
-//# define JSON_USE_CPPTL 1
-/// If defined, indicates that cpptl vector based map should be used instead of std::map
-/// as Value container.
-//# define JSON_USE_CPPTL_SMALLMAP 1
-/// If defined, indicates that Json specific container should be used
-/// (hash table & simple deque container with customizable allocator).
-/// THIS FEATURE IS STILL EXPERIMENTAL!
-//# define JSON_VALUE_USE_INTERNAL_MAP 1
-/// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
-/// The memory pools allocator used optimization (initializing Value and ValueInternalLink
-/// as if it was a POD) that may cause some validation tool to report errors.
-/// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
-//# define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
-
-/// If defined, indicates that Json use exception to report invalid type manipulation
-/// instead of C assert macro.
-# define JSON_USE_EXCEPTION 1
-
-# ifdef JSON_IN_CPPTL
-# include
-# ifndef JSON_USE_CPPTL
-# define JSON_USE_CPPTL 1
-# endif
-# endif
-
-# ifdef JSON_IN_CPPTL
-# define JSON_API CPPTL_API
-# elif defined(JSON_DLL_BUILD)
-# define JSON_API __declspec(dllexport)
-# elif defined(JSON_DLL)
-# define JSON_API __declspec(dllimport)
-# else
-# define JSON_API
-# endif
-
-#endif // JSON_CONFIG_H_INCLUDED
diff --git a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/features.h b/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/features.h
deleted file mode 100644
index 5a9adec..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/features.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
-# define CPPTL_JSON_FEATURES_H_INCLUDED
-
-# include "forwards.h"
-
-namespace Json {
-
- /** \brief Configuration passed to reader and writer.
- * This configuration object can be used to force the Reader or Writer
- * to behave in a standard conforming way.
- */
- class JSON_API Features
- {
- public:
- /** \brief A configuration that allows all features and assumes all strings are UTF-8.
- * - C & C++ comments are allowed
- * - Root object can be any JSON value
- * - Assumes Value strings are encoded in UTF-8
- */
- static Features all();
-
- /** \brief A configuration that is strictly compatible with the JSON specification.
- * - Comments are forbidden.
- * - Root object must be either an array or an object value.
- * - Assumes Value strings are encoded in UTF-8
- */
- static Features strictMode();
-
- /** \brief Initialize the configuration like JsonConfig::allFeatures;
- */
- Features();
-
- /// \c true if comments are allowed. Default: \c true.
- bool allowComments_;
-
- /// \c true if root must be either an array or an object value. Default: \c false.
- bool strictRoot_;
- };
-
-} // namespace Json
-
-#endif // CPPTL_JSON_FEATURES_H_INCLUDED
diff --git a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/forwards.h b/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/forwards.h
deleted file mode 100644
index d0ce830..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/forwards.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef JSON_FORWARDS_H_INCLUDED
-# define JSON_FORWARDS_H_INCLUDED
-
-# include "config.h"
-
-namespace Json {
-
- // writer.h
- class FastWriter;
- class StyledWriter;
-
- // reader.h
- class Reader;
-
- // features.h
- class Features;
-
- // value.h
- typedef int Int;
- typedef unsigned int UInt;
- class StaticString;
- class Path;
- class PathArgument;
- class Value;
- class ValueIteratorBase;
- class ValueIterator;
- class ValueConstIterator;
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
- class ValueAllocator;
- class ValueMapAllocator;
- class ValueInternalLink;
- class ValueInternalArray;
- class ValueInternalMap;
-#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
-
-} // namespace Json
-
-
-#endif // JSON_FORWARDS_H_INCLUDED
diff --git a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/json.h b/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/json.h
deleted file mode 100644
index c71ed65..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/json.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef JSON_JSON_H_INCLUDED
-# define JSON_JSON_H_INCLUDED
-
-# include "autolink.h"
-# include "value.h"
-# include "reader.h"
-# include "writer.h"
-# include "features.h"
-
-#endif // JSON_JSON_H_INCLUDED
diff --git a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/reader.h b/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/reader.h
deleted file mode 100644
index ee1d6a2..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/reader.h
+++ /dev/null
@@ -1,196 +0,0 @@
-#ifndef CPPTL_JSON_READER_H_INCLUDED
-# define CPPTL_JSON_READER_H_INCLUDED
-
-# include "features.h"
-# include "value.h"
-# include
-# include
-# include
-# include
-
-namespace Json {
-
- /** \brief Unserialize a JSON document into a Value.
- *
- */
- class JSON_API Reader
- {
- public:
- typedef char Char;
- typedef const Char *Location;
-
- /** \brief Constructs a Reader allowing all features
- * for parsing.
- */
- Reader();
-
- /** \brief Constructs a Reader allowing the specified feature set
- * for parsing.
- */
- Reader( const Features &features );
-
- /** \brief Read a Value from a JSON document.
- * \param document UTF-8 encoded string containing the document to read.
- * \param root [out] Contains the root value of the document if it was
- * successfully parsed.
- * \param collectComments \c true to collect comment and allow writing them back during
- * serialization, \c false to discard comments.
- * This parameter is ignored if Features::allowComments_
- * is \c false.
- * \return \c true if the document was successfully parsed, \c false if an error occurred.
- */
- bool parse( const std::string &document,
- Value &root,
- bool collectComments = true );
-
- /** \brief Read a Value from a JSON document.
- * \param document UTF-8 encoded string containing the document to read.
- * \param root [out] Contains the root value of the document if it was
- * successfully parsed.
- * \param collectComments \c true to collect comment and allow writing them back during
- * serialization, \c false to discard comments.
- * This parameter is ignored if Features::allowComments_
- * is \c false.
- * \return \c true if the document was successfully parsed, \c false if an error occurred.
- */
- bool parse( const char *beginDoc, const char *endDoc,
- Value &root,
- bool collectComments = true );
-
- /// \brief Parse from input stream.
- /// \see Json::operator>>(std::istream&, Json::Value&).
- bool parse( std::istream &is,
- Value &root,
- bool collectComments = true );
-
- /** \brief Returns a user friendly string that list errors in the parsed document.
- * \return Formatted error message with the list of errors with their location in
- * the parsed document. An empty string is returned if no error occurred
- * during parsing.
- */
- std::string getFormatedErrorMessages() const;
-
- private:
- enum TokenType
- {
- tokenEndOfStream = 0,
- tokenObjectBegin,
- tokenObjectEnd,
- tokenArrayBegin,
- tokenArrayEnd,
- tokenString,
- tokenNumber,
- tokenTrue,
- tokenFalse,
- tokenNull,
- tokenArraySeparator,
- tokenMemberSeparator,
- tokenComment,
- tokenError
- };
-
- class Token
- {
- public:
- TokenType type_;
- Location start_;
- Location end_;
- };
-
- class ErrorInfo
- {
- public:
- Token token_;
- std::string message_;
- Location extra_;
- };
-
- typedef std::deque Errors;
-
- bool expectToken( TokenType type, Token &token, const char *message );
- bool readToken( Token &token );
- void skipSpaces();
- bool match( Location pattern,
- int patternLength );
- bool readComment();
- bool readCStyleComment();
- bool readCppStyleComment();
- bool readString();
- void readNumber();
- bool readValue();
- bool readObject( Token &token );
- bool readArray( Token &token );
- bool decodeNumber( Token &token );
- bool decodeString( Token &token );
- bool decodeString( Token &token, std::string &decoded );
- bool decodeDouble( Token &token );
- bool decodeUnicodeCodePoint( Token &token,
- Location ¤t,
- Location end,
- unsigned int &unicode );
- bool decodeUnicodeEscapeSequence( Token &token,
- Location ¤t,
- Location end,
- unsigned int &unicode );
- bool addError( const std::string &message,
- Token &token,
- Location extra = 0 );
- bool recoverFromError( TokenType skipUntilToken );
- bool addErrorAndRecover( const std::string &message,
- Token &token,
- TokenType skipUntilToken );
- void skipUntilSpace();
- Value ¤tValue();
- Char getNextChar();
- void getLocationLineAndColumn( Location location,
- int &line,
- int &column ) const;
- std::string getLocationLineAndColumn( Location location ) const;
- void addComment( Location begin,
- Location end,
- CommentPlacement placement );
- void skipCommentTokens( Token &token );
-
- typedef std::stack Nodes;
- Nodes nodes_;
- Errors errors_;
- std::string document_;
- Location begin_;
- Location end_;
- Location current_;
- Location lastValueEnd_;
- Value *lastValue_;
- std::string commentsBefore_;
- Features features_;
- bool collectComments_;
- };
-
- /** \brief Read from 'sin' into 'root'.
-
- Always keep comments from the input JSON.
-
- This can be used to read a file into a particular sub-object.
- For example:
- \code
- Json::Value root;
- cin >> root["dir"]["file"];
- cout << root;
- \endcode
- Result:
- \verbatim
- {
- "dir": {
- "file": {
- // The input stream JSON would be nested here.
- }
- }
- }
- \endverbatim
- \throw std::exception on parse error.
- \see Json::operator<<()
- */
- std::istream& operator>>( std::istream&, Value& );
-
-} // namespace Json
-
-#endif // CPPTL_JSON_READER_H_INCLUDED
diff --git a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/value.h b/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/value.h
deleted file mode 100644
index 58bfd88..0000000
--- a/plugins/phonegap-plugin-barcodescanner/src/blackberry10/native/public/json/value.h
+++ /dev/null
@@ -1,1069 +0,0 @@
-#ifndef CPPTL_JSON_H_INCLUDED
-# define CPPTL_JSON_H_INCLUDED
-
-# include "forwards.h"
-# include
-# include
-
-# ifndef JSON_USE_CPPTL_SMALLMAP
-# include