+
diff --git a/platforms/android/assets/www/js/main.js b/platforms/android/assets/www/js/main.js
index 13679be..2d67bdf 100644
--- a/platforms/android/assets/www/js/main.js
+++ b/platforms/android/assets/www/js/main.js
@@ -7,7 +7,7 @@
/**
* API base URL
*/
-APIURL = "http://localhost:8000/";
+APIURL = "http://snipe-mobile-api/snipeapi/app/";
username = "";
/**
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-battery-status/www/battery.js b/platforms/android/assets/www/plugins/cordova-plugin-battery-status/www/battery.js
deleted file mode 100644
index 5394ef8..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-battery-status/www/battery.js
+++ /dev/null
@@ -1,113 +0,0 @@
-cordova.define("cordova-plugin-battery-status.battery", function(require, exports, module) {
-/*
- *
- * 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.
- *
-*/
-
-/**
- * This class contains information about the current battery status.
- * @constructor
- */
-var cordova = require('cordova'),
- exec = require('cordova/exec');
-
-var STATUS_CRITICAL = 5;
-var STATUS_LOW = 20;
-
-var Battery = function() {
- this._level = null;
- this._isPlugged = null;
- // Create new event handlers on the window (returns a channel instance)
- this.channels = {
- batterystatus:cordova.addWindowEventHandler("batterystatus"),
- batterylow:cordova.addWindowEventHandler("batterylow"),
- batterycritical:cordova.addWindowEventHandler("batterycritical")
- };
- for (var key in this.channels) {
- this.channels[key].onHasSubscribersChange = Battery.onHasSubscribersChange;
- }
-};
-
-function handlers() {
- return battery.channels.batterystatus.numHandlers +
- battery.channels.batterylow.numHandlers +
- battery.channels.batterycritical.numHandlers;
-}
-
-/**
- * Event handlers for when callbacks get registered for the battery.
- * Keep track of how many handlers we have so we can start and stop the native battery listener
- * appropriately (and hopefully save on battery life!).
- */
-Battery.onHasSubscribersChange = function() {
- // If we just registered the first handler, make sure native listener is started.
- if (this.numHandlers === 1 && handlers() === 1) {
- exec(battery._status, battery._error, "Battery", "start", []);
- } else if (handlers() === 0) {
- exec(null, null, "Battery", "stop", []);
- }
-};
-
-/**
- * Callback for battery status
- *
- * @param {Object} info keys: level, isPlugged
- */
-Battery.prototype._status = function (info) {
-
- if (info) {
- if (battery._level !== info.level || battery._isPlugged !== info.isPlugged) {
-
- if(info.level === null && battery._level !== null) {
- return; // special case where callback is called because we stopped listening to the native side.
- }
-
- // Something changed. Fire batterystatus event
- cordova.fireWindowEvent("batterystatus", info);
-
- if (!info.isPlugged) { // do not fire low/critical if we are charging. issue: CB-4520
- // note the following are NOT exact checks, as we want to catch a transition from
- // above the threshold to below. issue: CB-4519
- if (battery._level > STATUS_CRITICAL && info.level <= STATUS_CRITICAL) {
- // Fire critical battery event
- cordova.fireWindowEvent("batterycritical", info);
- }
- else if (battery._level > STATUS_LOW && info.level <= STATUS_LOW) {
- // Fire low battery event
- cordova.fireWindowEvent("batterylow", info);
- }
- }
- battery._level = info.level;
- battery._isPlugged = info.isPlugged;
- }
- }
-};
-
-/**
- * Error callback for battery start
- */
-Battery.prototype._error = function(e) {
- console.log("Error initializing Battery: " + e);
-};
-
-var battery = new Battery(); // jshint ignore:line
-
-module.exports = battery;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/Contact.js b/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/Contact.js
deleted file mode 100644
index 22c3d0c..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/Contact.js
+++ /dev/null
@@ -1,143 +0,0 @@
-cordova.define("cordova-plugin-contacts.Contact", function(require, exports, module) {
-/*
- *
- * 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 argscheck = require('cordova/argscheck'),
- exec = require('cordova/exec'),
- ContactError = require('./ContactError'),
- utils = require('cordova/utils'),
- convertUtils = require('./convertUtils');
-
-/**
-* Contains information about a single contact.
-* @constructor
-* @param {DOMString} id unique identifier
-* @param {DOMString} displayName
-* @param {ContactName} name
-* @param {DOMString} nickname
-* @param {Array.
} phoneNumbers array of phone numbers
-* @param {Array.} emails array of email addresses
-* @param {Array.} addresses array of addresses
-* @param {Array.} ims instant messaging user ids
-* @param {Array.} organizations
-* @param {DOMString} birthday contact's birthday
-* @param {DOMString} note user notes about contact
-* @param {Array.} photos
-* @param {Array.} categories
-* @param {Array.} urls contact's web sites
-*/
-var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
- ims, organizations, birthday, note, photos, categories, urls) {
- this.id = id || null;
- this.rawId = null;
- this.displayName = displayName || null;
- this.name = name || null; // ContactName
- this.nickname = nickname || null;
- this.phoneNumbers = phoneNumbers || null; // ContactField[]
- this.emails = emails || null; // ContactField[]
- this.addresses = addresses || null; // ContactAddress[]
- this.ims = ims || null; // ContactField[]
- this.organizations = organizations || null; // ContactOrganization[]
- this.birthday = birthday || null;
- this.note = note || null;
- this.photos = photos || null; // ContactField[]
- this.categories = categories || null; // ContactField[]
- this.urls = urls || null; // ContactField[]
-};
-
-/**
-* Removes contact from device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.remove = function(successCB, errorCB) {
- argscheck.checkArgs('FF', 'Contact.remove', arguments);
- var fail = errorCB && function(code) {
- errorCB(new ContactError(code));
- };
- if (this.id === null) {
- fail(ContactError.UNKNOWN_ERROR);
- }
- else {
- exec(successCB, fail, "Contacts", "remove", [this.id]);
- }
-};
-
-/**
-* Creates a deep copy of this Contact.
-* With the contact ID set to null.
-* @return copy of this Contact
-*/
-Contact.prototype.clone = function() {
- var clonedContact = utils.clone(this);
- clonedContact.id = null;
- clonedContact.rawId = null;
-
- function nullIds(arr) {
- if (arr) {
- for (var i = 0; i < arr.length; ++i) {
- arr[i].id = null;
- }
- }
- }
-
- // Loop through and clear out any id's in phones, emails, etc.
- nullIds(clonedContact.phoneNumbers);
- nullIds(clonedContact.emails);
- nullIds(clonedContact.addresses);
- nullIds(clonedContact.ims);
- nullIds(clonedContact.organizations);
- nullIds(clonedContact.categories);
- nullIds(clonedContact.photos);
- nullIds(clonedContact.urls);
- return clonedContact;
-};
-
-/**
-* Persists contact to device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.save = function(successCB, errorCB) {
- argscheck.checkArgs('FFO', 'Contact.save', arguments);
- var fail = errorCB && function(code) {
- errorCB(new ContactError(code));
- };
- var success = function(result) {
- if (result) {
- if (successCB) {
- var fullContact = require('./contacts').create(result);
- successCB(convertUtils.toCordovaFormat(fullContact));
- }
- }
- else {
- // no Entry object returned
- fail(ContactError.UNKNOWN_ERROR);
- }
- };
- var dupContact = convertUtils.toNativeFormat(utils.clone(this));
- exec(success, fail, "Contacts", "save", [dupContact]);
-};
-
-
-module.exports = Contact;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactAddress.js b/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactAddress.js
deleted file mode 100644
index c6c163e..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactAddress.js
+++ /dev/null
@@ -1,49 +0,0 @@
-cordova.define("cordova-plugin-contacts.ContactAddress", function(require, exports, module) {
-/*
- *
- * 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.
- *
-*/
-
-/**
-* Contact address.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code
-* @param formatted // NOTE: not a W3C standard
-* @param streetAddress
-* @param locality
-* @param region
-* @param postalCode
-* @param country
-*/
-
-var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
- this.id = null;
- this.pref = (typeof pref != 'undefined' ? pref : false);
- this.type = type || null;
- this.formatted = formatted || null;
- this.streetAddress = streetAddress || null;
- this.locality = locality || null;
- this.region = region || null;
- this.postalCode = postalCode || null;
- this.country = country || null;
-};
-
-module.exports = ContactAddress;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactError.js b/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactError.js
deleted file mode 100644
index f7a7671..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactError.js
+++ /dev/null
@@ -1,46 +0,0 @@
-cordova.define("cordova-plugin-contacts.ContactError", function(require, exports, module) {
-/*
- *
- * 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.
- *
-*/
-
-/**
- * ContactError.
- * An error code assigned by an implementation when an error has occurred
- * @constructor
- */
-var ContactError = function(err) {
- this.code = (typeof err != 'undefined' ? err : null);
-};
-
-/**
- * Error codes
- */
-ContactError.UNKNOWN_ERROR = 0;
-ContactError.INVALID_ARGUMENT_ERROR = 1;
-ContactError.TIMEOUT_ERROR = 2;
-ContactError.PENDING_OPERATION_ERROR = 3;
-ContactError.IO_ERROR = 4;
-ContactError.NOT_SUPPORTED_ERROR = 5;
-ContactError.OPERATION_CANCELLED_ERROR = 6;
-ContactError.PERMISSION_DENIED_ERROR = 20;
-
-module.exports = ContactError;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactField.js b/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactField.js
deleted file mode 100644
index de72ed4..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactField.js
+++ /dev/null
@@ -1,40 +0,0 @@
-cordova.define("cordova-plugin-contacts.ContactField", function(require, exports, module) {
-/*
- *
- * 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.
- *
-*/
-
-/**
-* Generic contact field.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param type
-* @param value
-* @param pref
-*/
-var ContactField = function(type, value, pref) {
- this.id = null;
- this.type = (type && type.toString()) || null;
- this.value = (value && value.toString()) || null;
- this.pref = (typeof pref != 'undefined' ? pref : false);
-};
-
-module.exports = ContactField;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactFieldType.js b/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactFieldType.js
deleted file mode 100644
index 9f61cfd..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactFieldType.js
+++ /dev/null
@@ -1,58 +0,0 @@
-cordova.define("cordova-plugin-contacts.ContactFieldType", function(require, exports, module) {
-/*
- *
- * 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.
- *
-*/
-
- // Possible field names for various platforms.
- // Some field names are platform specific
-
- var fieldType = {
- addresses: "addresses",
- birthday: "birthday",
- categories: "categories",
- country: "country",
- department: "department",
- displayName: "displayName",
- emails: "emails",
- familyName: "familyName",
- formatted: "formatted",
- givenName: "givenName",
- honorificPrefix: "honorificPrefix",
- honorificSuffix: "honorificSuffix",
- id: "id",
- ims: "ims",
- locality: "locality",
- middleName: "middleName",
- name: "name",
- nickname: "nickname",
- note: "note",
- organizations: "organizations",
- phoneNumbers: "phoneNumbers",
- photos: "photos",
- postalCode: "postalCode",
- region: "region",
- streetAddress: "streetAddress",
- title: "title",
- urls: "urls"
- };
-
- module.exports = fieldType;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactFindOptions.js b/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactFindOptions.js
deleted file mode 100644
index 92b9f49..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactFindOptions.js
+++ /dev/null
@@ -1,41 +0,0 @@
-cordova.define("cordova-plugin-contacts.ContactFindOptions", function(require, exports, module) {
-/*
- *
- * 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.
- *
-*/
-
-/**
- * ContactFindOptions.
- * @constructor
- * @param filter used to match contacts against
- * @param multiple boolean used to determine if more than one contact should be returned
- * @param desiredFields
- * @param hasPhoneNumber boolean used to filter the search and only return contacts that have a phone number informed
- */
-
-var ContactFindOptions = function(filter, multiple, desiredFields, hasPhoneNumber) {
- this.filter = filter || '';
- this.multiple = (typeof multiple != 'undefined' ? multiple : false);
- this.desiredFields = typeof desiredFields != 'undefined' ? desiredFields : [];
- this.hasPhoneNumber = typeof hasPhoneNumber != 'undefined' ? hasPhoneNumber : false;
-};
-
-module.exports = ContactFindOptions;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactName.js b/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactName.js
deleted file mode 100644
index f18a28a..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactName.js
+++ /dev/null
@@ -1,44 +0,0 @@
-cordova.define("cordova-plugin-contacts.ContactName", function(require, exports, module) {
-/*
- *
- * 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.
- *
-*/
-
-/**
-* Contact name.
-* @constructor
-* @param formatted // NOTE: not part of W3C standard
-* @param familyName
-* @param givenName
-* @param middle
-* @param prefix
-* @param suffix
-*/
-var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
- this.formatted = formatted || null;
- this.familyName = familyName || null;
- this.givenName = givenName || null;
- this.middleName = middle || null;
- this.honorificPrefix = prefix || null;
- this.honorificSuffix = suffix || null;
-};
-
-module.exports = ContactName;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactOrganization.js b/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactOrganization.js
deleted file mode 100644
index bb79853..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/ContactOrganization.js
+++ /dev/null
@@ -1,44 +0,0 @@
-cordova.define("cordova-plugin-contacts.ContactOrganization", function(require, exports, module) {
-/*
- *
- * 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.
- *
-*/
-
-/**
-* Contact organization.
-* @constructor
-* @param pref
-* @param type
-* @param name
-* @param dept
-* @param title
-*/
-
-var ContactOrganization = function(pref, type, name, dept, title) {
- this.id = null;
- this.pref = (typeof pref != 'undefined' ? pref : false);
- this.type = type || null;
- this.name = name || null;
- this.department = dept || null;
- this.title = title || null;
-};
-
-module.exports = ContactOrganization;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/contacts.js b/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/contacts.js
deleted file mode 100644
index 6546d85..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/contacts.js
+++ /dev/null
@@ -1,102 +0,0 @@
-cordova.define("cordova-plugin-contacts.contacts", function(require, exports, module) {
-/*
- *
- * 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 argscheck = require('cordova/argscheck'),
- exec = require('cordova/exec'),
- ContactError = require('./ContactError'),
- Contact = require('./Contact'),
- fieldType = require('./ContactFieldType'),
- convertUtils = require('./convertUtils');
-
-/**
-* Represents a group of Contacts.
-* @constructor
-*/
-var contacts = {
- fieldType: fieldType,
- /**
- * Returns an array of Contacts matching the search criteria.
- * @param fields that should be searched
- * @param successCB success callback
- * @param errorCB error callback
- * @param {ContactFindOptions} options that can be applied to contact searching
- * @return array of Contacts matching search criteria
- */
- find: function(fields, successCB, errorCB, options) {
- argscheck.checkArgs('afFO', 'contacts.find', arguments);
- if (!fields.length) {
- if (errorCB) {
- errorCB(new ContactError(ContactError.INVALID_ARGUMENT_ERROR));
- }
- } else {
- // missing 'options' param means return all contacts
- options = options || { filter: '', multiple: true };
- var win = function(result) {
- var cs = [];
- for (var i = 0, l = result.length; i < l; i++) {
- cs.push(convertUtils.toCordovaFormat(contacts.create(result[i])));
- }
- successCB(cs);
- };
- exec(win, errorCB, "Contacts", "search", [fields, options]);
- }
- },
-
- /**
- * This function picks contact from phone using contact picker UI
- * @returns new Contact object
- */
- pickContact: function (successCB, errorCB) {
-
- argscheck.checkArgs('fF', 'contacts.pick', arguments);
-
- var win = function (result) {
- // if Contacts.pickContact return instance of Contact object
- // don't create new Contact object, use current
- var contact = result instanceof Contact ? result : contacts.create(result);
- successCB(convertUtils.toCordovaFormat(contact));
- };
- exec(win, errorCB, "Contacts", "pickContact", []);
- },
-
- /**
- * This function creates a new contact, but it does not persist the contact
- * to device storage. To persist the contact to device storage, invoke
- * contact.save().
- * @param properties an object whose properties will be examined to create a new Contact
- * @returns new Contact object
- */
- create: function(properties) {
- argscheck.checkArgs('O', 'contacts.create', arguments);
- var contact = new Contact();
- for (var i in properties) {
- if (typeof contact[i] !== 'undefined' && properties.hasOwnProperty(i)) {
- contact[i] = properties[i];
- }
- }
- return contact;
- }
-};
-
-module.exports = contacts;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/convertUtils.js b/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/convertUtils.js
deleted file mode 100644
index 01588fc..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-contacts/www/convertUtils.js
+++ /dev/null
@@ -1,73 +0,0 @@
-cordova.define("cordova-plugin-contacts.convertUtils", function(require, exports, module) {
-/*
- *
- * 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 utils = require('cordova/utils');
-
-module.exports = {
- /**
- * Converts primitives into Complex Object
- * Currently only used for Date fields
- */
- toCordovaFormat: function (contact) {
- var value = contact.birthday;
- if (value !== null) {
- try {
- contact.birthday = new Date(parseFloat(value));
-
- //we might get 'Invalid Date' which does not throw an error
- //and is an instance of Date.
- if (isNaN(contact.birthday.getTime())) {
- contact.birthday = null;
- }
-
- } catch (exception){
- console.log("Cordova Contact toCordovaFormat error: exception creating date.");
- }
- }
- return contact;
- },
-
- /**
- * Converts Complex objects into primitives
- * Only conversion at present is for Dates.
- **/
- toNativeFormat: function (contact) {
- var value = contact.birthday;
- if (value !== null) {
- // try to make it a Date object if it is not already
- if (!utils.isDate(value)){
- try {
- value = new Date(value);
- } catch(exception){
- value = null;
- }
- }
- if (utils.isDate(value)){
- value = value.valueOf(); // convert to milliseconds
- }
- contact.birthday = value;
- }
- return contact;
- }
-};
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-device-motion/www/Acceleration.js b/platforms/android/assets/www/plugins/cordova-plugin-device-motion/www/Acceleration.js
deleted file mode 100644
index 794476b..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-device-motion/www/Acceleration.js
+++ /dev/null
@@ -1,32 +0,0 @@
-cordova.define("cordova-plugin-device-motion.Acceleration", function(require, exports, module) {
-/*
- *
- * 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 Acceleration = function(x, y, z, timestamp) {
- this.x = x;
- this.y = y;
- this.z = z;
- this.timestamp = timestamp || (new Date()).getTime();
-};
-
-module.exports = Acceleration;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-device-motion/www/accelerometer.js b/platforms/android/assets/www/plugins/cordova-plugin-device-motion/www/accelerometer.js
deleted file mode 100644
index b2d01f7..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-device-motion/www/accelerometer.js
+++ /dev/null
@@ -1,205 +0,0 @@
-cordova.define("cordova-plugin-device-motion.accelerometer", function(require, exports, module) {
-/*
- *
- * 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.
- *
-*/
-
-/**
- * This class provides access to device accelerometer data.
- * @constructor
- */
-var argscheck = require('cordova/argscheck'),
- utils = require("cordova/utils"),
- exec = require("cordova/exec"),
- Acceleration = require('./Acceleration');
-
-// Is the accel sensor running?
-var running = false;
-
-// Keeps reference to watchAcceleration calls.
-var timers = {};
-
-// Array of listeners; used to keep track of when we should call start and stop.
-var listeners = [];
-
-// Last returned acceleration object from native
-var accel = null;
-
-// Timer used when faking up devicemotion events
-var eventTimerId = null;
-
-// Tells native to start.
-function start() {
- exec(function (a) {
- var tempListeners = listeners.slice(0);
- accel = new Acceleration(a.x, a.y, a.z, a.timestamp);
- for (var i = 0, l = tempListeners.length; i < l; i++) {
- tempListeners[i].win(accel);
- }
- }, function (e) {
- var tempListeners = listeners.slice(0);
- for (var i = 0, l = tempListeners.length; i < l; i++) {
- tempListeners[i].fail(e);
- }
- }, "Accelerometer", "start", []);
- running = true;
-}
-
-// Tells native to stop.
-function stop() {
- exec(null, null, "Accelerometer", "stop", []);
- accel = null;
- running = false;
-}
-
-// Adds a callback pair to the listeners array
-function createCallbackPair(win, fail) {
- return { win: win, fail: fail };
-}
-
-// Removes a win/fail listener pair from the listeners array
-function removeListeners(l) {
- var idx = listeners.indexOf(l);
- if (idx > -1) {
- listeners.splice(idx, 1);
- if (listeners.length === 0) {
- stop();
- }
- }
-}
-
-var accelerometer = {
- /**
- * Asynchronously acquires the current acceleration.
- *
- * @param {Function} successCallback The function to call when the acceleration data is available
- * @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
- * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
- */
- getCurrentAcceleration: function (successCallback, errorCallback, options) {
- argscheck.checkArgs('fFO', 'accelerometer.getCurrentAcceleration', arguments);
-
- if (cordova.platformId === "windowsphone") {
- exec(function (a) {
- accel = new Acceleration(a.x, a.y, a.z, a.timestamp);
- successCallback(accel);
- }, function (e) {
- errorCallback(e);
- }, "Accelerometer", "getCurrentAcceleration", []);
-
- return;
- }
-
- var p;
- var win = function (a) {
- removeListeners(p);
- successCallback(a);
- };
- var fail = function (e) {
- removeListeners(p);
- if (errorCallback) {
- errorCallback(e);
- }
- };
-
- p = createCallbackPair(win, fail);
- listeners.push(p);
-
- if (!running) {
- start();
- }
- },
-
- /**
- * Asynchronously acquires the acceleration repeatedly at a given interval.
- *
- * @param {Function} successCallback The function to call each time the acceleration data is available
- * @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
- * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
- * @return String The watch id that must be passed to #clearWatch to stop watching.
- */
- watchAcceleration: function (successCallback, errorCallback, options) {
- argscheck.checkArgs('fFO', 'accelerometer.watchAcceleration', arguments);
- // Default interval (10 sec)
- var frequency = (options && options.frequency && typeof options.frequency == 'number') ? options.frequency : 10000;
-
- // Keep reference to watch id, and report accel readings as often as defined in frequency
- var id = utils.createUUID();
-
- var p = createCallbackPair(function () { }, function (e) {
- removeListeners(p);
- if (errorCallback) {
- errorCallback(e);
- }
- });
- listeners.push(p);
-
- timers[id] = {
- timer: window.setInterval(function () {
- if (accel) {
- successCallback(accel);
- }
- }, frequency),
- listeners: p
- };
-
- if (running) {
- // If we're already running then immediately invoke the success callback
- // but only if we have retrieved a value, sample code does not check for null ...
- if (accel) {
- successCallback(accel);
- }
- } else {
- start();
- }
-
- if (cordova.platformId === "browser" && !eventTimerId) {
- // Start firing devicemotion events if we haven't already
- var devicemotionEvent = new Event('devicemotion');
- eventTimerId = window.setInterval(function() {
- window.dispatchEvent(devicemotionEvent);
- }, 200);
- }
-
- return id;
- },
-
- /**
- * Clears the specified accelerometer watch.
- *
- * @param {String} id The id of the watch returned from #watchAcceleration.
- */
- clearWatch: function (id) {
- // Stop javascript timer & remove from timer list
- if (id && timers[id]) {
- window.clearInterval(timers[id].timer);
- removeListeners(timers[id].listeners);
- delete timers[id];
-
- if (eventTimerId && Object.keys(timers).length === 0) {
- // No more watchers, so stop firing 'devicemotion' events
- window.clearInterval(eventTimerId);
- eventTimerId = null;
- }
- }
- }
-};
-module.exports = accelerometer;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-device-orientation/www/CompassError.js b/platforms/android/assets/www/plugins/cordova-plugin-device-orientation/www/CompassError.js
deleted file mode 100644
index 0055b9a..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-device-orientation/www/CompassError.js
+++ /dev/null
@@ -1,37 +0,0 @@
-cordova.define("cordova-plugin-device-orientation.CompassError", function(require, exports, module) {
-/*
- *
- * 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.
- *
-*/
-
-/**
- * CompassError.
- * An error code assigned by an implementation when an error has occurred
- * @constructor
- */
-var CompassError = function(err) {
- this.code = (err !== undefined ? err : null);
-};
-
-CompassError.COMPASS_INTERNAL_ERR = 0;
-CompassError.COMPASS_NOT_SUPPORTED = 20;
-
-module.exports = CompassError;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-device-orientation/www/CompassHeading.js b/platforms/android/assets/www/plugins/cordova-plugin-device-orientation/www/CompassHeading.js
deleted file mode 100644
index 4ebb4aa..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-device-orientation/www/CompassHeading.js
+++ /dev/null
@@ -1,32 +0,0 @@
-cordova.define("cordova-plugin-device-orientation.CompassHeading", function(require, exports, module) {
-/*
- *
- * 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 CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, timestamp) {
- this.magneticHeading = magneticHeading;
- this.trueHeading = trueHeading;
- this.headingAccuracy = headingAccuracy;
- this.timestamp = timestamp || new Date().getTime();
-};
-
-module.exports = CompassHeading;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-device-orientation/www/compass.js b/platforms/android/assets/www/plugins/cordova-plugin-device-orientation/www/compass.js
deleted file mode 100644
index 48ee5f6..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-device-orientation/www/compass.js
+++ /dev/null
@@ -1,121 +0,0 @@
-cordova.define("cordova-plugin-device-orientation.compass", function(require, exports, module) {
-/*
- *
- * 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 argscheck = require('cordova/argscheck'),
- exec = require('cordova/exec'),
- utils = require('cordova/utils'),
- CompassHeading = require('./CompassHeading'),
- CompassError = require('./CompassError'),
-
- timers = {},
- eventTimerId = null,
- compass = {
- /**
- * Asynchronously acquires the current heading.
- * @param {Function} successCallback The function to call when the heading
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the heading data.
- * @param {CompassOptions} options The options for getting the heading data (not used).
- */
- getCurrentHeading:function(successCallback, errorCallback, options) {
- argscheck.checkArgs('fFO', 'compass.getCurrentHeading', arguments);
-
- var win = function(result) {
- var ch = new CompassHeading(result.magneticHeading, result.trueHeading, result.headingAccuracy, result.timestamp);
- successCallback(ch);
- };
- var fail = errorCallback && function(code) {
- var ce = new CompassError(code);
- errorCallback(ce);
- };
-
- // Get heading
- exec(win, fail, "Compass", "getHeading", [options]);
- },
-
- /**
- * Asynchronously acquires the heading repeatedly at a given interval.
- * @param {Function} successCallback The function to call each time the heading
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the heading data.
- * @param {HeadingOptions} options The options for getting the heading data
- * such as timeout and the frequency of the watch. For iOS, filter parameter
- * specifies to watch via a distance filter rather than time.
- */
- watchHeading:function(successCallback, errorCallback, options) {
- argscheck.checkArgs('fFO', 'compass.watchHeading', arguments);
- // Default interval (100 msec)
- var frequency = (options !== undefined && options.frequency !== undefined) ? options.frequency : 100;
- var filter = (options !== undefined && options.filter !== undefined) ? options.filter : 0;
-
- var id = utils.createUUID();
- if (filter > 0) {
- // is an iOS request for watch by filter, no timer needed
- timers[id] = "iOS";
- compass.getCurrentHeading(successCallback, errorCallback, options);
- } else {
- // Start watch timer to get headings
- timers[id] = window.setInterval(function() {
- compass.getCurrentHeading(successCallback, errorCallback);
- }, frequency);
- }
-
- if (cordova.platformId === 'browser' && !eventTimerId) {
- // Start firing deviceorientation events if haven't already
- var deviceorientationEvent = new Event('deviceorientation');
- eventTimerId = window.setInterval(function() {
- window.dispatchEvent(deviceorientationEvent);
- }, 200);
- }
-
- return id;
- },
-
- /**
- * Clears the specified heading watch.
- * @param {String} id The ID of the watch returned from #watchHeading.
- */
- clearWatch:function(id) {
- // Stop javascript timer & remove from timer list
- if (id && timers[id]) {
- if (timers[id] != "iOS") {
- clearInterval(timers[id]);
- } else {
- // is iOS watch by filter so call into device to stop
- exec(null, null, "Compass", "stopHeading", []);
- }
- delete timers[id];
-
- if (eventTimerId && Object.keys(timers).length === 0) {
- // No more watchers, so stop firing 'deviceorientation' events
- window.clearInterval(eventTimerId);
- eventTimerId = null;
- }
- }
- }
- };
-
-module.exports = compass;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-file-transfer/www/FileTransfer.js b/platforms/android/assets/www/plugins/cordova-plugin-file-transfer/www/FileTransfer.js
deleted file mode 100644
index 3019d5e..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-file-transfer/www/FileTransfer.js
+++ /dev/null
@@ -1,242 +0,0 @@
-cordova.define("cordova-plugin-file-transfer.FileTransfer", function(require, exports, module) {
-/*
- *
- * 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.
- *
-*/
-
-/* global cordova, FileSystem */
-
-var argscheck = require('cordova/argscheck'),
- exec = require('cordova/exec'),
- FileTransferError = require('./FileTransferError'),
- ProgressEvent = require('cordova-plugin-file.ProgressEvent');
-
-function newProgressEvent(result) {
- var pe = new ProgressEvent();
- pe.lengthComputable = result.lengthComputable;
- pe.loaded = result.loaded;
- pe.total = result.total;
- return pe;
-}
-
-function getUrlCredentials(urlString) {
- var credentialsPattern = /^https?\:\/\/(?:(?:(([^:@\/]*)(?::([^@\/]*))?)?@)?([^:\/?#]*)(?::(\d*))?).*$/,
- credentials = credentialsPattern.exec(urlString);
-
- return credentials && credentials[1];
-}
-
-function getBasicAuthHeader(urlString) {
- var header = null;
-
-
- // This is changed due to MS Windows doesn't support credentials in http uris
- // so we detect them by regexp and strip off from result url
- // Proof: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/a327cf3c-f033-4a54-8b7f-03c56ba3203f/windows-foundation-uri-security-problem
-
- if (window.btoa) {
- var credentials = getUrlCredentials(urlString);
- if (credentials) {
- var authHeader = "Authorization";
- var authHeaderValue = "Basic " + window.btoa(credentials);
-
- header = {
- name : authHeader,
- value : authHeaderValue
- };
- }
- }
-
- return header;
-}
-
-function convertHeadersToArray(headers) {
- var result = [];
- for (var header in headers) {
- if (headers.hasOwnProperty(header)) {
- var headerValue = headers[header];
- result.push({
- name: header,
- value: headerValue.toString()
- });
- }
- }
- return result;
-}
-
-var idCounter = 0;
-
-/**
- * FileTransfer uploads a file to a remote server.
- * @constructor
- */
-var FileTransfer = function() {
- this._id = ++idCounter;
- this.onprogress = null; // optional callback
-};
-
-/**
-* Given an absolute file path, uploads a file on the device to a remote server
-* using a multipart HTTP request.
-* @param filePath {String} Full path of the file on the device
-* @param server {String} URL of the server to receive the file
-* @param successCallback (Function} Callback to be invoked when upload has completed
-* @param errorCallback {Function} Callback to be invoked upon error
-* @param options {FileUploadOptions} Optional parameters such as file name and mimetype
-* @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
-*/
-FileTransfer.prototype.upload = function(filePath, server, successCallback, errorCallback, options, trustAllHosts) {
- argscheck.checkArgs('ssFFO*', 'FileTransfer.upload', arguments);
- // check for options
- var fileKey = null;
- var fileName = null;
- var mimeType = null;
- var params = null;
- var chunkedMode = true;
- var headers = null;
- var httpMethod = null;
- var basicAuthHeader = getBasicAuthHeader(server);
- if (basicAuthHeader) {
- server = server.replace(getUrlCredentials(server) + '@', '');
-
- options = options || {};
- options.headers = options.headers || {};
- options.headers[basicAuthHeader.name] = basicAuthHeader.value;
- }
-
- if (options) {
- fileKey = options.fileKey;
- fileName = options.fileName;
- mimeType = options.mimeType;
- headers = options.headers;
- httpMethod = options.httpMethod || "POST";
- if (httpMethod.toUpperCase() == "PUT"){
- httpMethod = "PUT";
- } else {
- httpMethod = "POST";
- }
- if (options.chunkedMode !== null || typeof options.chunkedMode != "undefined") {
- chunkedMode = options.chunkedMode;
- }
- if (options.params) {
- params = options.params;
- }
- else {
- params = {};
- }
- }
-
- if (cordova.platformId === "windowsphone") {
- headers = headers && convertHeadersToArray(headers);
- params = params && convertHeadersToArray(params);
- }
-
- var fail = errorCallback && function(e) {
- var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body, e.exception);
- errorCallback(error);
- };
-
- var self = this;
- var win = function(result) {
- if (typeof result.lengthComputable != "undefined") {
- if (self.onprogress) {
- self.onprogress(newProgressEvent(result));
- }
- } else {
- if (successCallback) {
- successCallback(result);
- }
- }
- };
- exec(win, fail, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode, headers, this._id, httpMethod]);
-};
-
-/**
- * Downloads a file form a given URL and saves it to the specified directory.
- * @param source {String} URL of the server to receive the file
- * @param target {String} Full path of the file on the device
- * @param successCallback (Function} Callback to be invoked when upload has completed
- * @param errorCallback {Function} Callback to be invoked upon error
- * @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
- * @param options {FileDownloadOptions} Optional parameters such as headers
- */
-FileTransfer.prototype.download = function(source, target, successCallback, errorCallback, trustAllHosts, options) {
- argscheck.checkArgs('ssFF*', 'FileTransfer.download', arguments);
- var self = this;
-
- var basicAuthHeader = getBasicAuthHeader(source);
- if (basicAuthHeader) {
- source = source.replace(getUrlCredentials(source) + '@', '');
-
- options = options || {};
- options.headers = options.headers || {};
- options.headers[basicAuthHeader.name] = basicAuthHeader.value;
- }
-
- var headers = null;
- if (options) {
- headers = options.headers || null;
- }
-
- if (cordova.platformId === "windowsphone" && headers) {
- headers = convertHeadersToArray(headers);
- }
-
- var win = function(result) {
- if (typeof result.lengthComputable != "undefined") {
- if (self.onprogress) {
- return self.onprogress(newProgressEvent(result));
- }
- } else if (successCallback) {
- var entry = null;
- if (result.isDirectory) {
- entry = new (require('cordova-plugin-file.DirectoryEntry'))();
- }
- else if (result.isFile) {
- entry = new (require('cordova-plugin-file.FileEntry'))();
- }
- entry.isDirectory = result.isDirectory;
- entry.isFile = result.isFile;
- entry.name = result.name;
- entry.fullPath = result.fullPath;
- entry.filesystem = new FileSystem(result.filesystemName || (result.filesystem == window.PERSISTENT ? 'persistent' : 'temporary'));
- entry.nativeURL = result.nativeURL;
- successCallback(entry);
- }
- };
-
- var fail = errorCallback && function(e) {
- var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body, e.exception);
- errorCallback(error);
- };
-
- exec(win, fail, 'FileTransfer', 'download', [source, target, trustAllHosts, this._id, headers]);
-};
-
-/**
- * Aborts the ongoing file transfer on this object. The original error
- * callback for the file transfer will be called if necessary.
- */
-FileTransfer.prototype.abort = function() {
- exec(null, null, 'FileTransfer', 'abort', [this._id]);
-};
-
-module.exports = FileTransfer;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-file-transfer/www/FileTransferError.js b/platforms/android/assets/www/plugins/cordova-plugin-file-transfer/www/FileTransferError.js
deleted file mode 100644
index 18fb64c..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-file-transfer/www/FileTransferError.js
+++ /dev/null
@@ -1,44 +0,0 @@
-cordova.define("cordova-plugin-file-transfer.FileTransferError", function(require, exports, module) {
-/*
- *
- * 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.
- *
-*/
-
-/**
- * FileTransferError
- * @constructor
- */
-var FileTransferError = function(code, source, target, status, body, exception) {
- this.code = code || null;
- this.source = source || null;
- this.target = target || null;
- this.http_status = status || null;
- this.body = body || null;
- this.exception = exception || null;
-};
-
-FileTransferError.FILE_NOT_FOUND_ERR = 1;
-FileTransferError.INVALID_URL_ERR = 2;
-FileTransferError.CONNECTION_ERR = 3;
-FileTransferError.ABORT_ERR = 4;
-FileTransferError.NOT_MODIFIED_ERR = 5;
-
-module.exports = FileTransferError;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-geolocation/www/PositionError.js b/platforms/android/assets/www/plugins/cordova-plugin-geolocation/www/PositionError.js
deleted file mode 100644
index c26dd75..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-geolocation/www/PositionError.js
+++ /dev/null
@@ -1,41 +0,0 @@
-cordova.define("cordova-plugin-geolocation.PositionError", function(require, exports, module) {
-/*
- *
- * 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.
- *
-*/
-
-/**
- * Position error object
- *
- * @constructor
- * @param code
- * @param message
- */
-var PositionError = function(code, message) {
- this.code = code || null;
- this.message = message || '';
-};
-
-PositionError.prototype.PERMISSION_DENIED = PositionError.PERMISSION_DENIED = 1;
-PositionError.prototype.POSITION_UNAVAILABLE = PositionError.POSITION_UNAVAILABLE = 2;
-PositionError.prototype.TIMEOUT = PositionError.TIMEOUT = 3;
-
-module.exports = PositionError;
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-geolocation/www/android/geolocation.js b/platforms/android/assets/www/plugins/cordova-plugin-geolocation/www/android/geolocation.js
deleted file mode 100644
index 814aafb..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-geolocation/www/android/geolocation.js
+++ /dev/null
@@ -1,74 +0,0 @@
-cordova.define("cordova-plugin-geolocation.geolocation", function(require, exports, module) {
-/*
- *
- * 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 exec = cordova.require('cordova/exec');
-var utils = require('cordova/utils');
-var PositionError = require('./PositionError');
-
-// Native watchPosition method is called async after permissions prompt.
-// So we use additional map and own ids to return watch id synchronously.
-var pluginToNativeWatchMap = {};
-
-module.exports = {
- getCurrentPosition: function(success, error, args) {
- var win = function() {
- var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation');
- geo.getCurrentPosition(success, error, args);
- };
- var fail = function() {
- if (error) {
- error(new PositionError (PositionError.PERMISSION_DENIED, 'Illegal Access'));
- }
- };
- exec(win, fail, "Geolocation", "getPermission", []);
- },
-
- watchPosition: function(success, error, args) {
- var pluginWatchId = utils.createUUID();
-
- var win = function() {
- var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation');
- pluginToNativeWatchMap[pluginWatchId] = geo.watchPosition(success, error, args);
- };
-
- var fail = function() {
- if (error) {
- error(new PositionError(PositionError.PERMISSION_DENIED, 'Illegal Access'));
- }
- };
- exec(win, fail, "Geolocation", "getPermission", []);
-
- return pluginWatchId;
- },
-
- clearWatch: function(pluginWatchId) {
- var win = function() {
- var nativeWatchId = pluginToNativeWatchMap[pluginWatchId];
- var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation');
- geo.clearWatch(nativeWatchId);
- };
-
- exec(win, null, "Geolocation", "getPermission", []);
- }
-};
-
-});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js b/platforms/android/assets/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js
new file mode 100644
index 0000000..5beaa5f
--- /dev/null
+++ b/platforms/android/assets/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js
@@ -0,0 +1,36 @@
+cordova.define("cordova-plugin-splashscreen.SplashScreen", function(require, exports, module) {
+/*
+ *
+ * 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 exec = require('cordova/exec');
+
+var splashscreen = {
+ show:function() {
+ exec(null, null, "SplashScreen", "show", []);
+ },
+ hide:function() {
+ exec(null, null, "SplashScreen", "hide", []);
+ }
+};
+
+module.exports = splashscreen;
+
+});
diff --git a/platforms/android/assets/www/plugins/cordova-plugin-vibration/www/vibration.js b/platforms/android/assets/www/plugins/cordova-plugin-vibration/www/vibration.js
deleted file mode 100644
index 9825fd8..0000000
--- a/platforms/android/assets/www/plugins/cordova-plugin-vibration/www/vibration.js
+++ /dev/null
@@ -1,124 +0,0 @@
-cordova.define("cordova-plugin-vibration.notification", function(require, exports, module) {
-/*
- *
- * 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 exec = require('cordova/exec');
-
-/**
- * Provides access to the vibration mechanism on the device.
- */
-
-module.exports = {
-
- /**
- * Vibrates the device for a given amount of time or for a given pattern or immediately cancels any ongoing vibrations (depending on the parameter).
- *
- * @param {Integer} param The number of milliseconds to vibrate (if 0, cancels vibration)
- *
- *
- * @param {Array of Integer} param Pattern with which to vibrate the device.
- * Pass in an array of integers that
- * are the durations for which to
- * turn on or off the vibrator in
- * milliseconds. The FIRST value
- * indicates the
- * number of milliseconds for which
- * to keep the vibrator ON before
- * turning it off. The NEXT value indicates the
- * number of milliseconds for which
- * to keep the vibrator OFF before
- * turning it on. Subsequent values
- * alternate between durations in
- * milliseconds to turn the vibrator
- * off or to turn the vibrator on.
- * (if empty, cancels vibration)
- */
- vibrate: function(param) {
-
- /* Aligning with w3c spec */
-
- //vibrate
- if ((typeof param == 'number') && param !== 0)
- exec(null, null, "Vibration", "vibrate", [param]);
-
- //vibrate with array ( i.e. vibrate([3000]) )
- else if ((typeof param == 'object') && param.length == 1)
- {
- //cancel if vibrate([0])
- if (param[0] === 0)
- exec(null, null, "Vibration", "cancelVibration", []);
-
- //else vibrate
- else
- exec(null, null, "Vibration", "vibrate", [param[0]]);
- }
-
- //vibrate with a pattern
- else if ((typeof param == 'object') && param.length > 1)
- {
- var repeat = -1; //no repeat
- exec(null, null, "Vibration", "vibrateWithPattern", [param, repeat]);
- }
-
- //cancel vibration (param = 0 or [])
- else
- exec(null, null, "Vibration", "cancelVibration", []);
-
- return true;
- },
-
- /**
- * Vibrates the device with a given pattern.
- *
- * @param {Array of Integer} pattern Pattern with which to vibrate the device.
- * Pass in an array of integers that
- * are the durations for which to
- * turn on or off the vibrator in
- * milliseconds. The first value
- * indicates the number of milliseconds
- * to wait before turning the vibrator
- * on. The next value indicates the
- * number of milliseconds for which
- * to keep the vibrator on before
- * turning it off. Subsequent values
- * alternate between durations in
- * milliseconds to turn the vibrator
- * off or to turn the vibrator on.
- *
- * @param {Integer} repeat Optional index into the pattern array at which
- * to start repeating (will repeat until canceled),
- * or -1 for no repetition (default).
- */
- vibrateWithPattern: function(pattern, repeat) {
- repeat = (typeof repeat !== "undefined") ? repeat : -1;
- pattern.unshift(0); //add a 0 at beginning for backwards compatibility from w3c spec
- exec(null, null, "Vibration", "vibrateWithPattern", [pattern, repeat]);
- },
-
- /**
- * Immediately cancels any currently running vibration.
- */
- cancelVibration: function() {
- exec(null, null, "Vibration", "cancelVibration", []);
- }
-};
-
-});
diff --git a/platforms/android/assets/www/plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js b/platforms/android/assets/www/plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js
new file mode 100644
index 0000000..86c059a
--- /dev/null
+++ b/platforms/android/assets/www/plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js
@@ -0,0 +1,129 @@
+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");
+
+ /**
+ * 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;
+ }
+
+ exec(successCallback, errorCallback, '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/assets/www/screens/home.html b/platforms/android/assets/www/screens/home.html
index 2834e2d..5e1666a 100644
--- a/platforms/android/assets/www/screens/home.html
+++ b/platforms/android/assets/www/screens/home.html
@@ -1,30 +1,74 @@
-