| | |
| | | import com.hdl.sdk.link.core.config.HDLLinkConfig; |
| | | import com.hdl.sdk.link.core.connect.HDLUdpConnect; |
| | | import com.hdl.sdk.link.core.utils.mqtt.MqttRecvClient; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | //import com.umeng.analytics.MobclickAgent; |
| | | |
| | | import org.greenrobot.eventbus.Subscribe; |
| | | import org.greenrobot.eventbus.ThreadMode; |
| | |
| | | uniCallBackBaseBean.setData(topicArray[1]); |
| | | HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean); |
| | | HdlLogLogic.print(linkResponse.getTopic() + new Gson().toJson(linkResponse.getData()), true); |
| | | } else if (linkResponse.getTopic().endsWith("/app/thing/event/appHomeRefresh/up")) { |
| | | } else if (linkResponse.getTopic().endsWith("/app/thing/event/appHomeDeliverRollbackRefresh/up")) { |
| | | //B端登录电站回滚时,收到回滚的事件时,发个通知给uniapp,uniapp刷新下电站的权限,调整下菜单栏的内容。 |
| | | String[] topicArray = linkResponse.getTopic().split("/"); |
| | | if (topicArray.length < 2) { |
| | | return; |
| | | } |
| | | final String HomeId = topicArray[1]; |
| | | final String HomeId = topicArray[2]; |
| | | HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean(); |
| | | uniCallBackBaseBean.setType(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_home_delivery_rollback); |
| | | uniCallBackBaseBean.setData(HomeId); |
| | |
| | | return; |
| | | } else { |
| | | AppManagerUtils.getAppManager().finishAllActivity(); |
| | | //如果开发者调用kill或者exit之类的方法杀死进程,或者双击back键会杀死进程,请务必在此之前调用MobclickAgent.onKillProcess方法,用来保存统计数据。 |
| | | MobclickAgent.onKillProcess(_mActivity); |
| | | // //友盟sdk如果开发者调用kill或者exit之类的方法杀死进程,或者双击back键会杀死进程,请务必在此之前调用MobclickAgent.onKillProcess方法,用来保存统计数据。 |
| | | // MobclickAgent.onKillProcess(_mActivity); |
| | | Process.killProcess(Process.myPid()); |
| | | |
| | | } |