diff --git a/assets/gap.js b/assets/gap.js index c7390440..778209a9 100644 --- a/assets/gap.js +++ b/assets/gap.js @@ -330,7 +330,7 @@ var Device = { Device.storage.result = window.DroidGap.createDirectory(file); return Device.storage.result; } - } + }, audio: { @@ -352,7 +352,24 @@ var Device = { getDuration: function(file) { return window.DroidGap.getDurationAudio(file); } - } + }, + information: { + getLine1Number: function(){ + return window.DroidGap.getLine1Number(); + }, + getVoiceMailNumber: function(){ + return window.DroidGap.getVoiceMailNumber(); + }, + getNetworkOperatorName: function(){ + return window.DroidGap.getNetworkOperatorName(); + }, + getSimCountryIso: function(){ + return window.DroidGap.getSimCountryIso(); + }, + getTimeZoneID: function(){ + return window.DroidGap.getTimeZoneID(); + } + } } diff --git a/assets/index.html b/assets/index.html index 6aa8b010..1e35cb50 100644 --- a/assets/index.html +++ b/assets/index.html @@ -149,7 +149,14 @@ audio = function(func) } } - +phInformation = function(){ + alert ('Device.information.getLine1Number()'); + $('phnumber').value = Device.information.getLine1Number(); + $('vmnumber').value = Device.information.getVoiceMailNumber(); + $('nwoperator').value = Device.information.getNetworkOperatorName(); + $('simiso').value = Device.information.getSimCountryIso(); + $('tzid').value = Device.information.getTimeZoneID(); +} addLoadEvent(initGap); @@ -175,6 +182,7 @@ addLoadEvent(initGap);