@Override
public void init(Context context) {
//初始化代码块
}
@Override
public SdkInfoConfig getSdkConfig() {
KLog.e("获取配置 getSdkConfig");
return config;
}
public class SdkInfoConfig {
private boolean supportLogin; //是否支持登录
private String manufacturerName; //厂商的名称
}
@Override
public void login(String user, String pwd) {
JSONObject result = new JSONObject();
if("admin".equals(user) && "123456".equals(pwd)){
result.put("isSuccess",true);
result.put("info","登录成功");
}else{
result.put("isSuccess",false);
result.put("info","登录失败");
}
notifyHost(SdkAction.SDK_LOGIN,result.toJSONString());
}
{
"isSuccess":true/false
"info":"失败或成功信息"
}