import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
+import com.google.gson.Gson;
import com.zhixun.blesdk.debug_tool.adapter.MsgAdapter;
import com.zhixun.blesdk.debug_tool.utils.FileHelper;
import com.zhixun.blesdk.debug_tool.utils.FuncationChosePopupWindow;
import com.zhixun.blesdk.hssdk.entity.MsgBody;
import com.zhixun.blesdk.hssdk.entity.MsgResponse;
import com.zhixun.blesdk.hssdk.entity.OTAInfo;
+import com.zhixun.blesdk.hssdk.util.SobLog;
import org.json.JSONException;
import org.json.JSONObject;
private ArrayList<String> msg;
private Button btn_ota_chose;
private Button btn_getLog;
- private Button btn_check_ota;
+ private Button btn_check_ota;//28 11 61 01 d
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@Override
public void onResponse(MsgResponse msgResponse) {
HsDeviceInfo deviceInfo = (HsDeviceInfo) msgResponse.getBody();
+ SobLog.d(TAG,"deviceInfo="+new Gson().toJson(deviceInfo));
String version = deviceInfo.getMajor()+"."+deviceInfo.getMid()+"."+deviceInfo.getMinor();
//RL "http://iot.api.thisiot.com/ota/task?deviceId=%s&sourceVersion=%s"//获取升级url
- String url = "http://iot.api.thisiot.com/ota/task?deviceId="+deviceInfo.getMacAddress().replace(":","")+"&sourceVersion="+version;
+ String mac = HsAgentSdk.getInstance().getAPI().getWearDevice().getAddress();
+ String url = "http://iot.api.thisiot.com/ota/task/v2?deviceId="+mac.replace(":","")+"&sourceVersion="+version;
// url = "http://iot.api.thisiot.com/ota/task/v2?deviceId=28110687C456&sourceVersion=1.1.38";//临时测试url
+ SobLog.d(TAG,"url="+url);
HttpUtil.CallHttp(url, new HttpUtil.HttpCallBack() {
@Override
public void onResponse(String datas) {