短信监听运维和GPS定位获取
parent
8a1d399e62
commit
c1437e56a7
@ -0,0 +1,11 @@
|
||||
package com.xypower.mpmaster.sms;
|
||||
|
||||
|
||||
/*
|
||||
sim卡信息类
|
||||
*/
|
||||
public class ModelSlotAndSub {
|
||||
public String subId;
|
||||
public String simSlot;
|
||||
public String iccid;
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.xypower.mpmaster.sms;
|
||||
|
||||
//收到的短信信息模型
|
||||
public class SmsMessageModel {
|
||||
//短信内容
|
||||
private String content;
|
||||
|
||||
//发送的短信号码
|
||||
private String sender;
|
||||
|
||||
//收到短信的sim卡位置
|
||||
private int slot;
|
||||
|
||||
//短信收到的时间
|
||||
private String dateContent;
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getSender() {
|
||||
return sender;
|
||||
}
|
||||
|
||||
public void setSender(String sender) {
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
public int getSlot() {
|
||||
return slot;
|
||||
}
|
||||
|
||||
public void setSlot(int slot) {
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
public String getDateContent() {
|
||||
return dateContent;
|
||||
}
|
||||
|
||||
public void setDateContent(String dateContent) {
|
||||
this.dateContent = dateContent;
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.xypower.mpmaster.sms;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
/**
|
||||
* 短信接收的监听的广播
|
||||
*
|
||||
* @author jingjing
|
||||
*/
|
||||
public class SmsReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
SimUtil.analysisSMSInfo(intent,context);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.xypower.mpmaster.sms;
|
||||
|
||||
public enum SmsTypeEnum {
|
||||
REBOOT1("yw+at+stw21"), REBOOT2("at+stw21"), //重启命令
|
||||
YW_SCHEDULE("yw+at+stw51"), //拍照时间表设置
|
||||
OPERATE("yw+at+stw52"), //运维开关
|
||||
OPERATE_URL("yw+at+stw53"), //运维地址
|
||||
ADB("yw+at+ds"), //开关adb
|
||||
UPDATE("yw+at+update"), //远程升级
|
||||
READ_CMDID("at+str01"), //读取设备编号
|
||||
SET_CMDID("at+stw01"), //设置设备编号
|
||||
SET_IP("at+stw05"), //设置主站IP
|
||||
READ_IP("at+str05"), //读取主站IP端口
|
||||
SET_AI("yw+at+stw61"), //设置ai识别是否可用 0是不启用,1是启用
|
||||
GET_AI("yw+at+stw62"), //查询ai识别是否可用 0是不启用,1是启用
|
||||
SET_AI_BOARD("yw+at+stw63"), //设置ai画框是否可用 0是不启用,1是启用
|
||||
GET_AI_BOARD("yw+at+stw64"), //查询ai画框是否可用 0是不启用,1是启用
|
||||
GET_OSD("yw+at+str65"), //查询水印
|
||||
SET_OSD("yw+at+stw66"), //设置水印
|
||||
SET_PHOTO_SCHEDULE_LIST("at+stw37"), //拍照时间表设置
|
||||
GET_PHOTO_SCHEDULE_LIST("at+str37"), //拍照时间表查询
|
||||
SET_PHOTO_SCHEDULE("at+stw07"), //拍照时间表单独设置
|
||||
GET_PHOTO_SCHEDULE("at+str07"), //拍照时间表查询
|
||||
SET_RESOLUTION("at+stw38"), //分辨率设置
|
||||
GET_RESOLUTION("at+str38"), //查询分辨率
|
||||
TAKE_PHOTO("at+stw39"), //手动拍照/短视频并上传
|
||||
SET_HEART("yw+at+setHB"), //设置心跳间隔
|
||||
GET_HEART("yw+at+getHB"), //获取心跳间隔
|
||||
SET_TP("yw+at+setTP"), //设置传输协议
|
||||
GET_TP("yw+at+getTP"), //获取传输协议
|
||||
SET_PACKAGE("yw+at+setPackage"), //设置分包大小
|
||||
GET_PACKAGE("yw+at+getPackage"),//获取分包大小
|
||||
CLEAR_PHOTO("yw+at+clearPhoto"), //清除历史图片及视频
|
||||
CLEAR_LOG("yw+at+clearLog"), //删除日志
|
||||
CLEAR_ALL("yw+at+clearAll"), //清除图片、视频、日志
|
||||
RESTORE("yw+at+Restore"), //恢复出厂设置
|
||||
GET_GPS("yw+at+getGPS");//GPS数据获取
|
||||
|
||||
|
||||
private String name;
|
||||
|
||||
SmsTypeEnum(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue