| | |
| | | import android.Manifest; |
| | | import android.content.pm.PackageManager; |
| | | import android.os.Bundle; |
| | | import android.os.Parcel; |
| | | import android.os.Parcelable; |
| | | import android.view.MotionEvent; |
| | | import android.view.View; |
| | | |
| | | import com.google.gson.Gson; |
| | |
| | | import com.hdl.sdk.link.HDLLinkLocalSdk; |
| | | import com.hdl.sdk.link.common.event.EventListener; |
| | | import com.hdl.sdk.link.core.bean.LinkResponse; |
| | | import com.hdl.sdk.link.core.bean.ModbusResponse; |
| | | |
| | | import java.nio.charset.StandardCharsets; |
| | | |
| | | |
| | | public class MyPowerStationActivity extends CustomBaseActivity { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public void requestPermissions() { |
| | | String[] ary = PermissionUtils.checkPermission(_mActivity, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}); |
| | | if (ary.length > 0) { |
| | |
| | | allTopicsListener = new EventListener() { |
| | | @Override |
| | | public void onMessage(Object msg) { |
| | | if (msg instanceof LinkResponse) { |
| | | LinkResponse response = (LinkResponse) msg; |
| | | |
| | | if (msg instanceof ModbusResponse) { |
| | | ModbusResponse response = (ModbusResponse) msg; |
| | | if (response.getTopic() == null) { |
| | | return; |
| | | } |