diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-11-05 20:35:42 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-11-05 20:35:42 +0100 |
| commit | 60a306af8be5e06ac4c13419dd6b4189105f216e (patch) | |
| tree | a89277bd0a5c64ca5fee00fe882153f96801889e /StoneIsland/www/js/lib/etc/sim.js | |
| parent | f828ce6d0c308c2c5d67c71ee3141b015807fd62 (diff) | |
SIM card check - isNotAvailableInCanada
Diffstat (limited to 'StoneIsland/www/js/lib/etc/sim.js')
| -rw-r--r-- | StoneIsland/www/js/lib/etc/sim.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/StoneIsland/www/js/lib/etc/sim.js b/StoneIsland/www/js/lib/etc/sim.js new file mode 100644 index 00000000..4507e160 --- /dev/null +++ b/StoneIsland/www/js/lib/etc/sim.js @@ -0,0 +1,28 @@ +var sim = (function(){ + var sim = {} + + sim.loaded = false + sim.data = { + carrierName: 'unknown', + countryCode: 'xx', + mcc: '0', + mnc: '0', + } + + sim.fetch = function(){ + window.plugins.sim.getSimInfo(sim.success, sim.error) + } + + sim.success = function(data){ + console.log(data) + sim.data = data + sim.data.countryCode = sim.data.countryCode.toLowerCase() + sim.loaded = true + } + + sim.error = function(){ + console.log("no SIM card detected") + } + + return sim +})()
\ No newline at end of file |
