Socket
Socket
Sign inDemoInstall

com.peerio.cordova.plugin.carrier

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    com.peerio.cordova.plugin.carrier

Cordova Carrier Plugin


Version published
Weekly downloads
52
increased by173.68%
Maintainers
1
Install size
6.39 kB
Created
Weekly downloads
 

Readme

Source

cordova-plugin-carrier

Authors

This plugin was forked from https://github.com/dtmtec/cordova-plugin-carrier

What is it?

cordova-plugin-carrier is a cordova plugin to get the device's carrier name, mcc, mnc and country code. The information comes from the device's SIM card.

Installation

The plugin works on both Android and iOS platforms. To install it, go to your project dir and run this command:

cordova plugin add br.com.dtmtec.plugins.carrier

Usage

On both Android and iOS, the plugin returns to the app an JSON with the following properties: carrierName, countryCode, mcc, mnc.

<script>
  function alertCarrier() {
   var succ = function (data) {
     alert(data['carrierName']);
     alert(data['countryCode']);
     alert(data['mcc']);
     alert(data['mnc']);
   }

   var err = function () {
     alert('Error!');
   }

   window.plugins.carrier.getCarrierInfo(succ, err)
  }

  document.addEventListener('deviceready', alertCarrier, false);
</script>

Keywords

FAQs

Last updated on 09 Jul 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc