| /******************************************************************************* |
| * This file was generated by Tizen Web UI Builder. |
| * User should hand edit this file. |
| ********************************************************************************/ |
| |
| var gAppDeviceReady = false; |
| var gAppBatteryLevelStr = "battery yet unknown"; |
| var gAppBatteryValue = 100; |
| var gAppBatteryLowValue= 20; |
| var gAppBatteryCriticalValue = 5; |
| var gAppPowerPlugged = false; |
| |
| /** |
| * @param {Object} event |
| * @base onload |
| * @returns {Boolean} |
| */ |
| app.onload = function() { |
| // TODO:: Do your app initialization job |
| console.log("loaded"); |
| |
| |
| // Initialize function called when page loading is finished |
| document.addEventListener("deviceready", function() { |
| gAppDeviceReady = true; |
| console.log("Device = " + device.platform + ", Version = " + device.version); |
| }, false); |
| |
| window.setTimeout(function() { |
| if (!gAppDeviceReady) { |
| alert("Cordova initialization failed !!!"); |
| } |
| }, 1000); |
| }; |
| |
| /** |
| * @param {Object} event |
| * @base onunload |
| * @returns {Boolean} |
| */ |
| app.onunload = function() { |
| // TODO:: Do your app termination job |
| console.log("unloaded"); |
| }; |
| |
| /** |
| * @param {Object} event |
| * @base onshow |
| * @returns {Boolean} |
| */ |
| app.onshow = function() { |
| // TODO:: Do your job on visible |
| console.log("onshown"); |
| }; |
| |
| /** |
| * @param {Object} event |
| * @base onhide |
| * @returns {Boolean} |
| */ |
| app.onhide = function() { |
| // TODO:: Do your job on invisible |
| console.log("onhidden"); |
| }; |