Commit 57631099181734d6e92eed4d54488ab096f8d0eb
1 parent
2e06b31e
1 修改配网逻辑
Showing
2 changed files
with
8 additions
and
3 deletions
config.gradle
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/frame/view/SelectWifiFragmentView.java
| ... | ... | @@ -50,7 +50,7 @@ public class SelectWifiFragmentView implements MvpView { |
| 50 | 50 | private Handler failHandler; |
| 51 | 51 | private String familyId; |
| 52 | 52 | private String cmccId;//移动id |
| 53 | - private final int DELAY_TIME = 10;//延时查询10秒 | |
| 53 | + private final int DELAY_TIME = 5;//延时查询10秒 | |
| 54 | 54 | private Runnable failRunnable; |
| 55 | 55 | private boolean isSetNetSuccess = false; |
| 56 | 56 | private final int FAIL_DELAY_TIME = 40;//配网中等待时间40秒 |
| ... | ... | @@ -285,7 +285,12 @@ public class SelectWifiFragmentView implements MvpView { |
| 285 | 285 | fragment.getPresenter().queryConfigDeviceNetResult(getContext(), familyId, new SelectWifiFragmentPresenter.OnResponseListener() { |
| 286 | 286 | @Override |
| 287 | 287 | public void onSuccess(NetworkResultBean networkResultBean) { |
| 288 | - ConnBluetoothSuccessActivity.startActivity(getContext(), networkResultBean); | |
| 288 | + //判断是否绑定 | |
| 289 | + if (networkResultBean.isIsBinded()&&"success".equals(networkResultBean.getResult().trim())) { | |
| 290 | + ConnBluetoothSuccessActivity.startActivity(getContext(), networkResultBean); | |
| 291 | + } else { | |
| 292 | + AlertUtil.showDeftToast(getContext(), "配网失败,"); | |
| 293 | + } | |
| 289 | 294 | } |
| 290 | 295 | }); |
| 291 | 296 | } | ... | ... |