Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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(contact);
};
exec(win, errorCB, "Contacts", "pickContact", []);
},
Entry.prototype.getParent = function(successCallback, errorCallback) {
argscheck.checkArgs('FF', 'Entry.getParent', arguments);
var fs = this.filesystem;
var win = successCallback && function(result) {
var DirectoryEntry = require('./DirectoryEntry');
var entry = new DirectoryEntry(result.name, result.fullPath, fs, result.nativeURL);
successCallback(entry);
};
var fail = errorCallback && function(code) {
errorCallback(new FileError(code));
};
exec(win, fail, "File", "getParent", [this.toInternalURL()]);
};
get: function (key, success, error) {
argscheck.checkArgs('sfF', 'analytics.get', arguments);
exec(success, error, 'GoogleAnalytics', 'get', [key]);
},
cameraExport.getPicture = function(successCallback, errorCallback, options) {
argscheck.checkArgs('fFO', 'Camera.getPicture', arguments);
options = options || {};
var getValue = argscheck.getValue;
var quality = getValue(options.quality, 50);
var destinationType = getValue(options.destinationType, Camera.DestinationType.FILE_URI);
var sourceType = getValue(options.sourceType, Camera.PictureSourceType.CAMERA);
var targetWidth = getValue(options.targetWidth, -1);
var targetHeight = getValue(options.targetHeight, -1);
var encodingType = getValue(options.encodingType, Camera.EncodingType.JPEG);
var mediaType = getValue(options.mediaType, Camera.MediaType.PICTURE);
var allowEdit = !!options.allowEdit;
var correctOrientation = !!options.correctOrientation;
var saveToPhotoAlbum = !!options.saveToPhotoAlbum;
var popoverOptions = getValue(options.popoverOptions, null);
var cameraDirection = getValue(options.cameraDirection, Camera.Direction.BACK);
DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
argscheck.checkArgs('sOFF', 'DirectoryEntry.getFile', arguments);
var fs = this.filesystem;
var win = successCallback && function(result) {
var FileEntry = require('./FileEntry');
var entry = new FileEntry(result.name, result.fullPath, fs, result.nativeURL);
successCallback(entry);
};
var fail = errorCallback && function(code) {
errorCallback(new FileError(code));
};
exec(win, fail, "File", "getFile", [this.toInternalURL(), path, options]);
};
Entry.prototype.getParent = function (successCallback, errorCallback) {
argscheck.checkArgs('FF', 'Entry.getParent', arguments);
var fs = this.filesystem;
var win = successCallback && function (result) {
var DirectoryEntry = require('./DirectoryEntry');
var entry = new DirectoryEntry(result.name, result.fullPath, fs, result.nativeURL);
successCallback(entry);
};
var fail = errorCallback && function (code) {
errorCallback(new FileError(code));
};
exec(win, fail, 'File', 'getParent', [this.toInternalURL()]);
};
getFirstDayOfWeek:function(successCB, failureCB) {
argscheck.checkArgs('fF', 'Globalization.getFirstDayOfWeek', arguments);
exec(successCB, failureCB, "Globalization", "getFirstDayOfWeek", []);
},
sendMessage: function(successCallback, errorCallback, message) {
argscheck.checkArgs('ffs', 'GeTuiSdk.sendMessage', arguments);
exec(successCallback, errorCallback, 'GeTuiSdk', 'sendMessage', [message]);
},
dateToString: function (date, successCB, failureCB, options) {
argscheck.checkArgs('dfFO', 'Globalization.dateToString', arguments);
var dateValue = date.valueOf();
exec(successCB, failureCB, 'Globalization', 'dateToString', [{'date': dateValue, 'options': options}]);
},
stringToNumber: function (numberString, successCB, failureCB, options) {
argscheck.checkArgs('sfFO', 'Globalization.stringToNumber', arguments);
exec(successCB, failureCB, 'Globalization', 'stringToNumber', [{'numberString': numberString, 'options': options}]);
},