1.0.0 • Published 6 years ago

cordova-plugin-bugly-sdk v1.0.0

Weekly downloads
2
License
Apache 2.0 Licens...
Repository
github
Last release
6 years ago

项目说明

腾讯Buyly SDK的Cordova插件。

项目演示

Demo

项目使用

安装

cordova plugin add cordova-plugin-bugly-sdk  --variable ANDROID_APPID=your value --variable IOS_APPID=your value

调用

初始化SDK

注意不同平台下的参数配置可能有差异

var args = {
    // 通用配置
    debug:true,
    channel:"test",
    develop:true,
    version:"1.0",
    // 安卓配置
    // delay:20000,
    // package:"com.jasonz.bugly.demo",
    // IOS配置
    // device_id: "xxx-xxx",
    // block_monitor_enable: true,
    // block_monitor_timeout: 10000
};

Bugly.initSDK(function(success){
	console.log("初始化成功");
},function(err){
   console.log("初始化失败");
   console.log(err);
},args);

开启Javascript异常捕获(仅安卓)

  Bugly.enableJSMonitor();

设置用户ID

  var id = "jason.z";
  Bugly.setUserID(id);

设置TagID(id必须是数字)

  var id = 10086;
  Bugly.setTagID(id);

设置用户自定义数据

  var data = {
    key:'id',
    value:1
  };

 Bugly.putUserData(id);

还有一些测试闪退的方法,具体参考demo里的代码。

赞赏

如果我的项目对你有帮助,欢迎赞赏。

donate.png

1.0.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

7 years ago