| | |
| | | |
| | | import android.util.Log; |
| | | |
| | | import com.anyun.im_lib.util.ByteUtil; |
| | | |
| | | import safeluck.drive.evaluation.util.CThreadPoolExecutor; |
| | | import safeluck.drive.evaluation.util.Utils; |
| | | |
| | | /** |
| | | * MyApplication2 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void receiveMsg(String message) { |
| | | Log.i(TAG, "receiveMsg: "+message); |
| | | public void receiveMsg(byte[] message) { |
| | | byte[] datas = Utils.parseMsg(message); |
| | | Log.i(TAG, "receiveMsg: "+ ByteUtil.byte2HexStr(datas)); |
| | | byte checkcolde=Utils.calCheckCode(ByteUtil.subArray(datas,0,datas.length-1)); |
| | | if (checkcolde == datas[datas.length-1]){ |
| | | Log.i(TAG, "receiveMsg: 消息正确"); |
| | | } |
| | | } |
| | | |
| | | @Override |