说明

2.0.0新增的SDK配置参数容器类,只能通过TAConfigure.Builder来创建实例。

字段

字段名 类型 说明
url String 目镜数据上传的地址,与1.x中的init()中的url对应。
appkey String 目镜的appKey,区分应用,与1.x中的init()中的appKey对应
mpId long 应用的mpId, 与1.x中的init()中的mpId对应
channel String 渠道名称,与1.x中的init()中的channel对应,
deviceId String 自定义的设备Id
debugable boolean 是否为debug模式,debug模式下,SDK会打印一些调试信息,且新的数据都会触发数据上传。
obtainIMEIEnabled boolean SDK是否尝试获取IMEI,如果设置为true,SDK会尝试获取IMEI。但因为权限问题并不能保证一定能获取到,APP要保证已经获取到相关的权限。
maximumCachedBeforeSend int 触发SDK上传的最大数据缓存条数,debug状态下会忽略此设置(debug状态下数据会实时发送,相当于值为1)。当用户已经在本地累计储存超过maximumCachedBeforeSend条数据时,将触发数据上传。

方法

String url();
String appKey();
String mpId();
String channel();
String deviceId();
boolean debugable();
boolean obtainIMEIEnabled();
int maximumCachedBeforeSend();

TACofigure$Builder

TAConfigure的内部类,用于创建和编辑TAConfigure

构造函数

public Builder(String url, String appkey, long mpId)

方法

设置渠道信息
Builder channel(String channel);
设置自定义的设备ID
Builder deviceId(String deviceId);
设置debug状态
Builder debugable(boolean debugable);
设置obtaionImeiEnabled
Builder obtainIMEIEnabled(boolean enabled);
设置maximumCachedBeforeSend
Builder maximumCachedBeforeSend(boolean enabled);
创建TAConfigure
builder build();

results matching ""

    No results matching ""