Skip to content

pennycoding/carrierplugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cn.edu.gdmec.t00385.cordova.carrier

这是个用于测试cordova Ver3.0的插件编写的案例,可以返回android手机的运营商名称。

Installation 安装方法

cordova plugin add https://github.com/gdmec/carrierplugin.git

Supported Platforms

  • Android

Methods 调用方法

  • navigator.Carrier.getCarrierCode(onSuccess, onFailure);

Example

<button onclick="test();">获取手机运营商</button>
<script type="text/javascript">
    function test() {
        Carrier.getCarrierCode(onSuccess, onFailure);
    }
    function onSuccess(result) {
        alert("运营商: " + result);
    }
    function onFailure(err) {
        alert("Failure: " + err);
    }
</script>

About

cordova carrier plugin for android platform only

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 82.5%
  • JavaScript 17.5%