Add inventory use, add code scanning, tweaks
parent
5d2cc9e2f5
commit
b6733a3f3d
@ -0,0 +1 @@
|
||||
#Sun Aug 07 13:14:29 MDT 2016
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
incremental task execution
|
@ -0,0 +1 @@
|
||||
incremental task execution
|
@ -1,2 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merger version="3"><dataSet config="main"><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/assets"/></dataSet><dataSet config="debug"><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/src/debug/assets"/></dataSet></merger>
|
||||
<merger version="3"><dataSet config="main"><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/assets"/><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/build/generated/assets/shaders/debug"/></dataSet><dataSet config="debug"><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/src/debug/assets"/></dataSet></merger>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merger version="3"><dataSet config="main"><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/src/main/shaders"/></dataSet><dataSet config="debug"><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/src/debug/shaders"/></dataSet></merger>
|
@ -1,2 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merger version="3"><dataSet config="main"><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/assets"/></dataSet><dataSet config="release"><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/src/release/assets"/></dataSet></merger>
|
||||
<merger version="3"><dataSet config="main"><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/assets"/><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/build/generated/assets/shaders/release"/></dataSet><dataSet config="release"><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/src/release/assets"/></dataSet></merger>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merger version="3"><dataSet config="main"><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/src/main/shaders"/></dataSet><dataSet config="release"><source path="/home/skylar/Documents/Projects/Sources/TerranQuest/platforms/android/CordovaLib/src/release/shaders"/></dataSet></merger>
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,65 @@
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you 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.
|
||||
*/
|
||||
package org.apache.cordova;
|
||||
|
||||
import android.util.Pair;
|
||||
import android.util.SparseArray;
|
||||
|
||||
/**
|
||||
* Provides a collection that maps unique request codes to CordovaPlugins and Integers.
|
||||
* Used to ensure that when plugins make requests for runtime permissions, those requests do not
|
||||
* collide with requests from other plugins that use the same request code value.
|
||||
*/
|
||||
public class CallbackMap {
|
||||
private int currentCallbackId = 0;
|
||||
private SparseArray<Pair<CordovaPlugin, Integer>> callbacks;
|
||||
|
||||
public CallbackMap() {
|
||||
this.callbacks = new SparseArray<Pair<CordovaPlugin, Integer>>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores a CordovaPlugin and request code and returns a new unique request code to use
|
||||
* in a permission request.
|
||||
*
|
||||
* @param receiver The plugin that is making the request
|
||||
* @param requestCode The original request code used by the plugin
|
||||
* @return A unique request code that can be used to retrieve this callback
|
||||
* with getAndRemoveCallback()
|
||||
*/
|
||||
public synchronized int registerCallback(CordovaPlugin receiver, int requestCode) {
|
||||
int mappedId = this.currentCallbackId++;
|
||||
callbacks.put(mappedId, new Pair<CordovaPlugin, Integer>(receiver, requestCode));
|
||||
return mappedId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves and removes a callback stored in the map using the mapped request code
|
||||
* obtained from registerCallback()
|
||||
*
|
||||
* @param mappedId The request code obtained from registerCallback()
|
||||
* @return The CordovaPlugin and orignal request code that correspond to the
|
||||
* given mappedCode
|
||||
*/
|
||||
public synchronized Pair<CordovaPlugin, Integer> getAndRemoveCallback(int mappedId) {
|
||||
Pair<CordovaPlugin, Integer> callback = callbacks.get(mappedId);
|
||||
callbacks.remove(mappedId);
|
||||
return callback;
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M576 1152v128h-128v-128h128zm0-768v128h-128v-128h128zm768 0v128h-128v-128h128zm-1024 1023h384v-383h-384v383zm0-767h384v-384h-384v384zm768 0h384v-384h-384v384zm-256 256v640h-640v-640h640zm512 512v128h-128v-128h128zm256 0v128h-128v-128h128zm0-512v384h-384v-128h-128v384h-128v-640h384v128h128v-128h128zm-768-768v640h-640v-640h640zm768 0v640h-640v-640h640z"/></svg>
|
After Width: | Height: | Size: 461 B |
@ -0,0 +1,150 @@
|
||||
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;
|
||||
|
||||
});
|
@ -1,75 +0,0 @@
|
||||
/**
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you 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 loggerInstance;
|
||||
var util = require('util');
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var CordovaError = require('cordova-common').CordovaError;
|
||||
|
||||
/**
|
||||
* @class ConsoleLogger
|
||||
* @extends EventEmitter
|
||||
*
|
||||
* Implementing basic logging for platform. Inherits regular NodeJS
|
||||
* EventEmitter. All events, emitted on this class instance are immediately
|
||||
* logged to console.
|
||||
*
|
||||
* Also attaches handler to process' uncaught exceptions, so these exceptions
|
||||
* logged to console similar to regular error events.
|
||||
*/
|
||||
function ConsoleLogger() {
|
||||
EventEmitter.call(this);
|
||||
|
||||
var isVerbose = process.argv.indexOf('-d') >= 0 || process.argv.indexOf('--verbose') >= 0;
|
||||
// For CordovaError print only the message without stack trace unless we
|
||||
// are in a verbose mode.
|
||||
process.on('uncaughtException', function(err){
|
||||
if ((err instanceof CordovaError) && isVerbose) {
|
||||
console.error(err.stack);
|
||||
} else {
|
||||
console.error(err.message);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
this.on('results', console.log);
|
||||
this.on('verbose', function () {
|
||||
if (isVerbose)
|
||||
console.log.apply(console, arguments);
|
||||
});
|
||||
this.on('info', console.log);
|
||||
this.on('log', console.log);
|
||||
this.on('warn', console.warn);
|
||||
}
|
||||
util.inherits(ConsoleLogger, EventEmitter);
|
||||
|
||||
/**
|
||||
* Returns already instantiated/newly created instance of ConsoleLogger class.
|
||||
* This method should be used instead of creating ConsoleLogger directly,
|
||||
* otherwise we'll get multiple handlers attached to process'
|
||||
* uncaughtException
|
||||
*
|
||||
* @return {ConsoleLogger} New or already created instance of ConsoleLogger
|
||||
*/
|
||||
ConsoleLogger.get = function () {
|
||||
loggerInstance = loggerInstance || new ConsoleLogger();
|
||||
return loggerInstance;
|
||||
};
|
||||
|
||||
module.exports = ConsoleLogger;
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue