1.华为短信包smproxy(20040730).jar开发短信,上行短信中文转码
中文转码非我们预期的UTF-8、GBK、GB2312,而是UTF-16BE
if(8==msg_fmt){
contentStr = new String(contentByte,"UTF-16BE");
}else{
contentStr = new String(contentByte);
}
2.通过TypeConvert获取msgId
下行短信msgId获取:
TypeConvert.byte2long(submitRepMsg.getMsgId());
上行短信或状态报告msgId获取:
TypeConvert.byte2long (msg.getStatusMsgId());