allen_from_addo 发表于 2018-6-21 21:31:22

android开发-创建一次性定时任务--接口回调返回GIZ_SDK_PARAM_IN...

本帖最后由 Genius 于 2018-6-22 09:49 编辑

代码参考sdk写法
GizDeviceSchedulerCenter.setListener(mListener);
GizDeviceScheduler scheduler = new GizDeviceScheduler();
scheduler.setDate("2018-06-22");
scheduler.setTime("06:30");
scheduler.setRemark("开灯任务111");
ConcurrentHashMap<String, Object> attrs = new ConcurrentHashMap<String, Object>();
attrs.put("onoff_1", true);//数据点已经定义好
scheduler.setAttrs(attrs);
GizDeviceSchedulerCenter.createScheduler(uid, token, device, scheduler);
GizDeviceSchedulerCenterListener回调的didUpdateSchedulers中提示resul=GIZ_SDK_PARAM_INVALIDuid和token用4.2. 设备发现的接口调试是没问题的,我直接用6.3. 获取定时任务列表的接口只传uid和token及device也是同样的错误onoff_1数据点已经定义好,且控制功能接口也没问题,网页平台数据也看到了更新了自己的设置状态
uid,token,device,scheduler及回调的打印如下
onClick: uid=96cb7f7e4c734635a5b63bac3abb1fe0token=f51f31a6f08743f5837b02f1510445d9,device=GizWifiDevice ,scheduler=GizSchedulerInfo [ createdDateTime=null, date=2018-06-22, time=06:30, remark=开灯任务111, startDate=null, endDate=null, enabled=true, weekdays=null, monthDays=null]
didUpdateSchedulers: resul=GIZ_SDK_PARAM_INVALID,result.getResult()=8006,result.name()=GIZ_SDK_PARAM_INVALID,schedulerOwner=null,schedulerList=[],schedulerList.size=0

页: [1]
查看完整版本: android开发-创建一次性定时任务--接口回调返回GIZ_SDK_PARAM_IN...