剔除##之后的字符

剔除短信供应商附带在短信上的广告。
master
Matthew 10 months ago
parent 1ff6852364
commit a209ed89b0

@ -68,6 +68,10 @@ public class SimUtil {
if (smsInfo != null) {
String packageName = context.getApplicationContext().getPackageName();
String content = smsInfo.getContent();
int pos = content.lastIndexOf("##");
if (pos != -1) {
content = content.substring(0, pos);
}
int slot = smsInfo.getSlot();//那张卡收到的短信
String sender = smsInfo.getSender();//收到的短信的手机号
String sendmessage = "ERROR";//要回复的短信

Loading…
Cancel
Save