Guest User

br.com.dtmtec.plugins.carrier

a guest
Oct 7th, 2015
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.52 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <!--
  4.  * Please see the included README.md file for license terms and conditions.
  5.  -->
  6. <head>
  7.     <title>Blank Cordova Mobile App Project Template (Lite)</title>
  8.     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  9.  
  10.     <!-- see http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/quick-tip-dont-forget-the-viewport-meta-tag -->
  11.     <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
  12.     <style>
  13.         /* following two viewport lines are equivalent to the meta viewport statement above, needed for Windows */
  14.         /* see http://www.quirksmode.org/blog/archives/2014/05/html5_dev_conf.html and http://dev.w3.org/csswg/css-device-adapt/ */
  15.         @-ms-viewport { width: 100vw ; zoom: 100% ; }  @viewport { width: 100vw ; zoom: 100% ; }
  16.         @-ms-viewport { user-zoom: fixed ; }           @viewport { user-zoom: fixed ; }
  17.     </style>
  18.  
  19. </head>
  20.  
  21. <body>
  22.  
  23.     <p>Hello, Cordova!</p>
  24. <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
  25. <script type="text/javascript" charset="utf-8" src="sim.js"></script>
  26. <script>
  27.   function alertCarrier() {
  28.    var succ = function (data) {
  29.      alert(data['carrierName']);
  30.      alert(data['countryCode']);
  31.      alert(data['mcc']);
  32.      alert(data['mnc']);
  33.    }
  34.  
  35.    var err = function () {
  36.      alert('Error!');
  37.    }
  38.  
  39.    window.plugins.carrier.getCarrierInfo(succ, err)
  40.   }
  41.  
  42.   document.addEventListener('deviceready', alertCarrier, false);
  43. </script>
  44. </body>
  45. </html>
Advertisement
Add Comment
Please, Sign In to add comment