(function ($) { "use strict"; var __name__ = 'AndroidHost', __version__ = '1.0', __object__ = function () { this.Data = { }; }; __object__.prototype = { setEvents: function (events) { this.events = $.extend({ onEvent: function (name, value) { console.log(name + ':' + value); } }, events); }, setDeviceSerialNumber: function (value) { this.events.onEvent('onDeviceSerialNumberChanged', value); }, getDeviceSerialNumber: function () { if (typeof AndroidHost != 'undefined' && typeof AndroidHost.getDeviceSerialNumber == 'function') { return AndroidHost.getDeviceSerialNumber(); } return ''; }, showSysSetting: function () { if (typeof AndroidHost != 'undefined' && typeof AndroidHost.showSysSetting == 'function') { AndroidHost.showSysSetting(); } }, startReadIDCard: function () { if (typeof AndroidHost != 'undefined' && typeof AndroidHost.startReadIDCard == 'function') { AndroidHost.startReadIDCard(); } }, onReceiveIDCard: function (value) { this.events.onEvent('onReceiveIDCard', value); }, UpdateAPK: function () { if (typeof AndroidHost != 'undefined' && typeof AndroidHost.updateAPK == 'function') { AndroidHost.updateAPK(); } }, toast: function (msg) { if (typeof AndroidHost != 'undefined' && typeof AndroidHost.toast == 'function' && typeof (msg) == 'string') { AndroidHost.toast(String(msg)); } }, }; $[__name__] = new __object__(); })(jQuery);