var callNative = function (className, functionName, ...args) {
	var data = {
		class: className,
		function: functionName
	};
	if (args.length > 0) {
		data["args"] = args[0];
	}
	return JSON.stringify(data);
};
var NativeWebview = (function () {
	function NativeWebview() {
		var _this = this;
		return _this;
	}
	NativeWebview.prototype.hide = function () {
		android.JsToNative(callNative("Webview", "hide", { id: this.id }));
	};
	NativeWebview.prototype.close = function (value) {
		android.JsToNative(callNative("Webview", "close", { id: this.id }));
	};
	NativeWebview.prototype.clear = function () {

	};
	return NativeWebview;
} ());

var plus = new Object();
plus.webview = new Object();
plus.webview.getWebviewById = function (id) {
	var webview = new NativeWebview();
	webview.id = id;
	return webview;
};
plus.webview.currentWebview = function () {
	var webview = new NativeWebview();
	return webview;
};

plus.storage = new Object();
plus.storage.setItem = function(key, value) {
    android.JsToNative(callNative("Storage", "setItem", { key: key, value: value }));
};

plus.device = new Object();
plus.device.setWakelock = function(bool) {

};
