mirror of
https://github.com/pppscn/SmsForwarder
synced 2025-08-03 17:37:40 +08:00
新增:监听其他APP通知信息的规则配置
This commit is contained in:
parent
5703c7d637
commit
c950ad6c59
@ -116,7 +116,7 @@ void cmdExecute(String cmd) {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
|
||||||
testImplementation 'junit:junit:4.+'
|
testImplementation 'junit:junit:4.+'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||||
@ -129,8 +129,8 @@ dependencies {
|
|||||||
implementation "com.alibaba:fastjson:1.2.78"
|
implementation "com.alibaba:fastjson:1.2.78"
|
||||||
|
|
||||||
//友盟统计SDK
|
//友盟统计SDK
|
||||||
// implementation 'com.umeng.umsdk:common:9.4.4'// 必选
|
implementation 'com.umeng.umsdk:common:9.4.4'// 必选
|
||||||
// implementation 'com.umeng.umsdk:asms:1.4.1'// 必选
|
implementation 'com.umeng.umsdk:asms:1.4.1'// 必选
|
||||||
//implementation 'com.umeng.umsdk:apm:1.4.2' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
|
//implementation 'com.umeng.umsdk:apm:1.4.2' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
|
||||||
|
|
||||||
//XUpdate
|
//XUpdate
|
||||||
@ -152,7 +152,4 @@ dependencies {
|
|||||||
//AndroidAsync
|
//AndroidAsync
|
||||||
implementation 'com.koushikdutta.async:androidasync:3.1.0'
|
implementation 'com.koushikdutta.async:androidasync:3.1.0'
|
||||||
|
|
||||||
//Bind Android views and callbacks to fields and methods.
|
|
||||||
//implementation 'com.jakewharton:butterknife-gradle-plugin:10.2.3'
|
|
||||||
//annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
|
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
<receiver
|
<receiver
|
||||||
android:name=".receiver.SmsForwarderBroadcastReceiver"
|
android:name=".receiver.SmsBroadcastReceiver"
|
||||||
android:permission="android.permission.BROADCAST_SMS"
|
android:permission="android.permission.BROADCAST_SMS"
|
||||||
tools:ignore="IntentFilterExportedReceiver">
|
tools:ignore="IntentFilterExportedReceiver">
|
||||||
<intent-filter android:priority="2147483647">
|
<intent-filter android:priority="2147483647">
|
||||||
|
@ -16,6 +16,8 @@ import com.idormy.sms.forwarder.utils.Define;
|
|||||||
import com.idormy.sms.forwarder.utils.PhoneUtils;
|
import com.idormy.sms.forwarder.utils.PhoneUtils;
|
||||||
import com.idormy.sms.forwarder.utils.SettingUtil;
|
import com.idormy.sms.forwarder.utils.SettingUtil;
|
||||||
import com.smailnet.emailkit.EmailKit;
|
import com.smailnet.emailkit.EmailKit;
|
||||||
|
import com.umeng.analytics.MobclickAgent;
|
||||||
|
import com.umeng.commonsdk.UMConfigure;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -75,11 +77,11 @@ public class MyApplication extends Application {
|
|||||||
super.onCreate();
|
super.onCreate();
|
||||||
//初始化组件化基础库, 所有友盟业务SDK都必须调用此初始化接口。
|
//初始化组件化基础库, 所有友盟业务SDK都必须调用此初始化接口。
|
||||||
//建议在宿主App的Application.onCreate函数中调用基础组件库初始化函数。
|
//建议在宿主App的Application.onCreate函数中调用基础组件库初始化函数。
|
||||||
//UMConfigure.init(this, "60254fc7425ec25f10f4293e", getChannelName(this), UMConfigure.DEVICE_TYPE_PHONE, "");
|
UMConfigure.init(this, "60254fc7425ec25f10f4293e", getChannelName(this), UMConfigure.DEVICE_TYPE_PHONE, "");
|
||||||
// 选用LEGACY_AUTO页面采集模式
|
// 选用LEGACY_AUTO页面采集模式
|
||||||
//MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.LEGACY_MANUAL);
|
MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.LEGACY_MANUAL);
|
||||||
//pro close log
|
//pro close log
|
||||||
//UMConfigure.setLogEnabled(true);
|
UMConfigure.setLogEnabled(true);
|
||||||
|
|
||||||
Intent intent = new Intent(this, FrontService.class);
|
Intent intent = new Intent(this, FrontService.class);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
@ -29,6 +29,7 @@ import com.idormy.sms.forwarder.sender.SendUtil;
|
|||||||
import com.idormy.sms.forwarder.sender.SenderUtil;
|
import com.idormy.sms.forwarder.sender.SenderUtil;
|
||||||
import com.idormy.sms.forwarder.utils.RuleUtil;
|
import com.idormy.sms.forwarder.utils.RuleUtil;
|
||||||
import com.idormy.sms.forwarder.utils.SettingUtil;
|
import com.idormy.sms.forwarder.utils.SettingUtil;
|
||||||
|
import com.umeng.analytics.MobclickAgent;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -134,6 +135,28 @@ public class RuleActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getDialogView(String currentType) {
|
||||||
|
switch (currentType) {
|
||||||
|
case "call":
|
||||||
|
return R.layout.alert_dialog_setview_rule_call;
|
||||||
|
case "app":
|
||||||
|
return R.layout.alert_dialog_setview_rule_app;
|
||||||
|
default:
|
||||||
|
return R.layout.alert_dialog_setview_rule;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getDialogTitle(String currentType) {
|
||||||
|
switch (currentType) {
|
||||||
|
case "call":
|
||||||
|
return R.string.setrule_call;
|
||||||
|
case "app":
|
||||||
|
return R.string.setrule_app;
|
||||||
|
default:
|
||||||
|
return R.string.setrule;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
private void initRules() {
|
private void initRules() {
|
||||||
ruleModels = RuleUtil.getRule(null, null, currentType);
|
ruleModels = RuleUtil.getRule(null, null, currentType);
|
||||||
@ -145,7 +168,7 @@ public class RuleActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
private void setRule(final RuleModel ruleModel) {
|
private void setRule(final RuleModel ruleModel) {
|
||||||
final AlertDialog.Builder alertDialog71 = new AlertDialog.Builder(RuleActivity.this);
|
final AlertDialog.Builder alertDialog71 = new AlertDialog.Builder(RuleActivity.this);
|
||||||
final View view1 = View.inflate(RuleActivity.this, R.layout.alert_dialog_setview_rule, null);
|
final View view1 = View.inflate(RuleActivity.this, getDialogView(currentType), null);
|
||||||
|
|
||||||
final RadioGroup radioGroupRuleFiled = view1.findViewById(R.id.radioGroupRuleFiled);
|
final RadioGroup radioGroupRuleFiled = view1.findViewById(R.id.radioGroupRuleFiled);
|
||||||
if (ruleModel != null) radioGroupRuleFiled.check(ruleModel.getRuleFiledCheckId());
|
if (ruleModel != null) radioGroupRuleFiled.check(ruleModel.getRuleFiledCheckId());
|
||||||
@ -202,13 +225,16 @@ public class RuleActivity extends AppCompatActivity {
|
|||||||
Button buttonRuleDel = view1.findViewById(R.id.buttonRuleDel);
|
Button buttonRuleDel = view1.findViewById(R.id.buttonRuleDel);
|
||||||
Button buttonRuleTest = view1.findViewById(R.id.buttonRuleTest);
|
Button buttonRuleTest = view1.findViewById(R.id.buttonRuleTest);
|
||||||
alertDialog71
|
alertDialog71
|
||||||
.setTitle(R.string.setrule)
|
.setTitle(getDialogTitle(currentType))
|
||||||
//.setIcon(R.drawable.ic_sms_forwarder)
|
|
||||||
.setView(view1)
|
.setView(view1)
|
||||||
.create();
|
.create();
|
||||||
final AlertDialog show = alertDialog71.show();
|
final AlertDialog show = alertDialog71.show();
|
||||||
buttonRuleOk.setOnClickListener(view -> {
|
buttonRuleOk.setOnClickListener(view -> {
|
||||||
Object senderId = ruleSenderTv.getTag();
|
Object senderId = ruleSenderTv.getTag();
|
||||||
|
if (senderId == null) {
|
||||||
|
Toast.makeText(RuleActivity.this, R.string.new_sender_first, Toast.LENGTH_LONG).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
int radioGroupRuleCheckId = Math.max(radioGroupRuleCheck.getCheckedRadioButtonId(), radioGroupRuleCheck2.getCheckedRadioButtonId());
|
int radioGroupRuleCheckId = Math.max(radioGroupRuleCheck.getCheckedRadioButtonId(), radioGroupRuleCheck2.getCheckedRadioButtonId());
|
||||||
Log.d(TAG, radioGroupRuleCheck.getCheckedRadioButtonId() + " " + radioGroupRuleCheck2.getCheckedRadioButtonId() + " " + radioGroupRuleCheckId);
|
Log.d(TAG, radioGroupRuleCheck.getCheckedRadioButtonId() + " " + radioGroupRuleCheck2.getCheckedRadioButtonId() + " " + radioGroupRuleCheckId);
|
||||||
if (ruleModel == null) {
|
if (ruleModel == null) {
|
||||||
@ -220,9 +246,7 @@ public class RuleActivity extends AppCompatActivity {
|
|||||||
newRuleModel.setValue(editTextRuleValue.getText().toString());
|
newRuleModel.setValue(editTextRuleValue.getText().toString());
|
||||||
newRuleModel.setSwitchSmsTemplate(switchSmsTemplate.isChecked());
|
newRuleModel.setSwitchSmsTemplate(switchSmsTemplate.isChecked());
|
||||||
newRuleModel.setSmsTemplate(textSmsTemplate.getText().toString());
|
newRuleModel.setSmsTemplate(textSmsTemplate.getText().toString());
|
||||||
if (senderId != null) {
|
|
||||||
newRuleModel.setSenderId(Long.valueOf(senderId.toString()));
|
newRuleModel.setSenderId(Long.valueOf(senderId.toString()));
|
||||||
}
|
|
||||||
RuleUtil.addRule(newRuleModel);
|
RuleUtil.addRule(newRuleModel);
|
||||||
initRules();
|
initRules();
|
||||||
adapter.add(ruleModels);
|
adapter.add(ruleModels);
|
||||||
@ -233,9 +257,7 @@ public class RuleActivity extends AppCompatActivity {
|
|||||||
ruleModel.setValue(editTextRuleValue.getText().toString());
|
ruleModel.setValue(editTextRuleValue.getText().toString());
|
||||||
ruleModel.setSwitchSmsTemplate(switchSmsTemplate.isChecked());
|
ruleModel.setSwitchSmsTemplate(switchSmsTemplate.isChecked());
|
||||||
ruleModel.setSmsTemplate(textSmsTemplate.getText().toString());
|
ruleModel.setSmsTemplate(textSmsTemplate.getText().toString());
|
||||||
if (senderId != null) {
|
|
||||||
ruleModel.setSenderId(Long.valueOf(senderId.toString()));
|
ruleModel.setSenderId(Long.valueOf(senderId.toString()));
|
||||||
}
|
|
||||||
RuleUtil.updateRule(ruleModel);
|
RuleUtil.updateRule(ruleModel);
|
||||||
initRules();
|
initRules();
|
||||||
adapter.update(ruleModels);
|
adapter.update(ruleModels);
|
||||||
@ -257,7 +279,9 @@ public class RuleActivity extends AppCompatActivity {
|
|||||||
Object senderId = ruleSenderTv.getTag();
|
Object senderId = ruleSenderTv.getTag();
|
||||||
if (senderId == null) {
|
if (senderId == null) {
|
||||||
Toast.makeText(RuleActivity.this, R.string.new_sender_first, Toast.LENGTH_LONG).show();
|
Toast.makeText(RuleActivity.this, R.string.new_sender_first, Toast.LENGTH_LONG).show();
|
||||||
} else {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int radioGroupRuleCheckId = Math.max(radioGroupRuleCheck.getCheckedRadioButtonId(), radioGroupRuleCheck2.getCheckedRadioButtonId());
|
int radioGroupRuleCheckId = Math.max(radioGroupRuleCheck.getCheckedRadioButtonId(), radioGroupRuleCheck2.getCheckedRadioButtonId());
|
||||||
if (ruleModel == null) {
|
if (ruleModel == null) {
|
||||||
RuleModel newRuleModel = new RuleModel();
|
RuleModel newRuleModel = new RuleModel();
|
||||||
@ -277,7 +301,6 @@ public class RuleActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
testRule(ruleModel, Long.valueOf(senderId.toString()));
|
testRule(ruleModel, Long.valueOf(senderId.toString()));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//自定义模板
|
//自定义模板
|
||||||
@ -306,6 +329,20 @@ public class RuleActivity extends AppCompatActivity {
|
|||||||
textSmsTemplate.append("{{短信内容}}");
|
textSmsTemplate.append("{{短信内容}}");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Button buttonInsertSenderApp = view1.findViewById(R.id.bt_insert_sender_app);
|
||||||
|
buttonInsertSenderApp.setOnClickListener(view -> {
|
||||||
|
textSmsTemplate.setFocusable(true);
|
||||||
|
textSmsTemplate.requestFocus();
|
||||||
|
textSmsTemplate.append("{{APP包名}}");
|
||||||
|
});
|
||||||
|
|
||||||
|
Button buttonInsertContentApp = view1.findViewById(R.id.bt_insert_content_app);
|
||||||
|
buttonInsertContentApp.setOnClickListener(view -> {
|
||||||
|
textSmsTemplate.setFocusable(true);
|
||||||
|
textSmsTemplate.requestFocus();
|
||||||
|
textSmsTemplate.append("{{通知内容}}");
|
||||||
|
});
|
||||||
|
|
||||||
Button buttonInsertExtra = view1.findViewById(R.id.bt_insert_extra);
|
Button buttonInsertExtra = view1.findViewById(R.id.bt_insert_extra);
|
||||||
buttonInsertExtra.setOnClickListener(view -> {
|
buttonInsertExtra.setOnClickListener(view -> {
|
||||||
textSmsTemplate.setFocusable(true);
|
textSmsTemplate.setFocusable(true);
|
||||||
@ -474,13 +511,13 @@ public class RuleActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
//MobclickAgent.onResume(this);
|
MobclickAgent.onResume(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
//MobclickAgent.onPause(this);
|
MobclickAgent.onPause(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,7 @@ import com.idormy.sms.forwarder.sender.SenderSmsMsg;
|
|||||||
import com.idormy.sms.forwarder.sender.SenderTelegramMsg;
|
import com.idormy.sms.forwarder.sender.SenderTelegramMsg;
|
||||||
import com.idormy.sms.forwarder.sender.SenderUtil;
|
import com.idormy.sms.forwarder.sender.SenderUtil;
|
||||||
import com.idormy.sms.forwarder.sender.SenderWebNotifyMsg;
|
import com.idormy.sms.forwarder.sender.SenderWebNotifyMsg;
|
||||||
|
import com.umeng.analytics.MobclickAgent;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -1188,13 +1189,13 @@ public class SenderActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
//MobclickAgent.onResume(this);
|
MobclickAgent.onResume(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
//MobclickAgent.onPause(this);
|
MobclickAgent.onPause(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,9 @@ import lombok.Data;
|
|||||||
public class RuleModel {
|
public class RuleModel {
|
||||||
public static final String FILED_TRANSPOND_ALL = "transpond_all";
|
public static final String FILED_TRANSPOND_ALL = "transpond_all";
|
||||||
public static final String FILED_PHONE_NUM = "phone_num";
|
public static final String FILED_PHONE_NUM = "phone_num";
|
||||||
|
public static final String FILED_PACKAGE_NAME = "package_name";
|
||||||
public static final String FILED_MSG_CONTENT = "msg_content";
|
public static final String FILED_MSG_CONTENT = "msg_content";
|
||||||
|
public static final String FILED_INFORM_CONTENT = "inform_content";
|
||||||
public static final String FILED_MULTI_MATCH = "multi_match";
|
public static final String FILED_MULTI_MATCH = "multi_match";
|
||||||
public static final Map<String, String> FILED_MAP = new HashMap<>();
|
public static final Map<String, String> FILED_MAP = new HashMap<>();
|
||||||
public static final String CHECK_IS = "is";
|
public static final String CHECK_IS = "is";
|
||||||
@ -50,6 +52,8 @@ public class RuleModel {
|
|||||||
FILED_MAP.put("phone_num", "手机号");
|
FILED_MAP.put("phone_num", "手机号");
|
||||||
FILED_MAP.put("msg_content", "内容");
|
FILED_MAP.put("msg_content", "内容");
|
||||||
FILED_MAP.put("multi_match", "多重匹配");
|
FILED_MAP.put("multi_match", "多重匹配");
|
||||||
|
FILED_MAP.put("package_name", "APP包名");
|
||||||
|
FILED_MAP.put("inform_content", "通知内容");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@ -96,6 +100,10 @@ public class RuleModel {
|
|||||||
return FILED_MSG_CONTENT;
|
return FILED_MSG_CONTENT;
|
||||||
case R.id.btnPhone:
|
case R.id.btnPhone:
|
||||||
return FILED_PHONE_NUM;
|
return FILED_PHONE_NUM;
|
||||||
|
case R.id.btnPackageName:
|
||||||
|
return FILED_PACKAGE_NAME;
|
||||||
|
case R.id.btnInformContent:
|
||||||
|
return FILED_INFORM_CONTENT;
|
||||||
case R.id.btnMultiMatch:
|
case R.id.btnMultiMatch:
|
||||||
return FILED_MULTI_MATCH;
|
return FILED_MULTI_MATCH;
|
||||||
default:
|
default:
|
||||||
@ -228,7 +236,7 @@ public class RuleModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getRuleMatch() {
|
public String getRuleMatch() {
|
||||||
String SimStr = SIM_SLOT_MAP.get(simSlot) + "卡 ";
|
String SimStr = "app".equals(type) ? "" : SIM_SLOT_MAP.get(simSlot) + "卡 ";
|
||||||
if (filed == null || filed.equals(FILED_TRANSPOND_ALL)) {
|
if (filed == null || filed.equals(FILED_TRANSPOND_ALL)) {
|
||||||
return SimStr + "全部 转发到 ";
|
return SimStr + "全部 转发到 ";
|
||||||
} else {
|
} else {
|
||||||
@ -246,6 +254,10 @@ public class RuleModel {
|
|||||||
return R.id.btnContent;
|
return R.id.btnContent;
|
||||||
case FILED_PHONE_NUM:
|
case FILED_PHONE_NUM:
|
||||||
return R.id.btnPhone;
|
return R.id.btnPhone;
|
||||||
|
case FILED_PACKAGE_NAME:
|
||||||
|
return R.id.btnPackageName;
|
||||||
|
case FILED_INFORM_CONTENT:
|
||||||
|
return R.id.btnInformContent;
|
||||||
case FILED_MULTI_MATCH:
|
case FILED_MULTI_MATCH:
|
||||||
return R.id.btnMultiMatch;
|
return R.id.btnMultiMatch;
|
||||||
default:
|
default:
|
||||||
|
@ -45,8 +45,8 @@ public class SmsVo implements Serializable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return customSmsTemplate.replace("{{来源号码}}", mobile)
|
return customSmsTemplate.replace("{{来源号码}}", mobile).replace("{{APP包名}}", mobile)
|
||||||
.replace("{{短信内容}}", content)
|
.replace("{{短信内容}}", content).replace("{{通知内容}}", content)
|
||||||
.replace("{{卡槽信息}}", simInfo)
|
.replace("{{卡槽信息}}", simInfo)
|
||||||
.replace("{{接收时间}}", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date))
|
.replace("{{接收时间}}", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date))
|
||||||
.replace("{{设备名称}}", deviceMark)
|
.replace("{{设备名称}}", deviceMark)
|
||||||
|
@ -19,13 +19,13 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public class SmsForwarderBroadcastReceiver extends BroadcastReceiver {
|
public class SmsBroadcastReceiver extends BroadcastReceiver {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
|
||||||
String receiveAction = intent.getAction();
|
String receiveAction = intent.getAction();
|
||||||
String TAG = "SmsForwarderBroadcastReceiver";
|
String TAG = "SmsBroadcastReceiver";
|
||||||
Log.d(TAG, "onReceive intent " + receiveAction);
|
Log.d(TAG, "onReceive intent " + receiveAction);
|
||||||
if ("android.provider.Telephony.SMS_RECEIVED".equals(receiveAction)) {
|
if ("android.provider.Telephony.SMS_RECEIVED".equals(receiveAction)) {
|
||||||
try {
|
try {
|
@ -17,7 +17,9 @@ class RuleLine {
|
|||||||
public static final String CONJUNCTION_AND = "并且";
|
public static final String CONJUNCTION_AND = "并且";
|
||||||
public static final String CONJUNCTION_OR = "或者";
|
public static final String CONJUNCTION_OR = "或者";
|
||||||
public static final String FILED_PHONE_NUM = "手机号";
|
public static final String FILED_PHONE_NUM = "手机号";
|
||||||
|
public static final String FILED_PACKAGE_NAME = "APP包名";
|
||||||
public static final String FILED_MSG_CONTENT = "短信内容";
|
public static final String FILED_MSG_CONTENT = "短信内容";
|
||||||
|
public static final String FILED_INFORM_CONTENT = "通知内容";
|
||||||
public static final String SURE_YES = "是";
|
public static final String SURE_YES = "是";
|
||||||
public static final String SURE_NOT = "不是";
|
public static final String SURE_NOT = "不是";
|
||||||
public static final String CHECK_EQUALS = "相等";
|
public static final String CHECK_EQUALS = "相等";
|
||||||
@ -43,6 +45,8 @@ class RuleLine {
|
|||||||
static {
|
static {
|
||||||
FILED_LIST.add("手机号");
|
FILED_LIST.add("手机号");
|
||||||
FILED_LIST.add("短信内容");
|
FILED_LIST.add("短信内容");
|
||||||
|
FILED_LIST.add("APP包名");
|
||||||
|
FILED_LIST.add("通知内容");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@ -269,9 +273,11 @@ class RuleLine {
|
|||||||
//先检查规则是否命中
|
//先检查规则是否命中
|
||||||
switch (this.field) {
|
switch (this.field) {
|
||||||
case FILED_PHONE_NUM:
|
case FILED_PHONE_NUM:
|
||||||
|
case FILED_PACKAGE_NAME:
|
||||||
mixChecked = checkValue(msg.getMobile());
|
mixChecked = checkValue(msg.getMobile());
|
||||||
break;
|
break;
|
||||||
case FILED_MSG_CONTENT:
|
case FILED_MSG_CONTENT:
|
||||||
|
case FILED_INFORM_CONTENT:
|
||||||
mixChecked = checkValue(msg.getContent());
|
mixChecked = checkValue(msg.getContent());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -80,7 +80,6 @@ public class RuleLineUtils {
|
|||||||
* Rule节点是否命中取决于:该节点是否命中、该节点子结点(如果有的话)是否命中、该节点下节点(如果有的话)是否命中
|
* Rule节点是否命中取决于:该节点是否命中、该节点子结点(如果有的话)是否命中、该节点下节点(如果有的话)是否命中
|
||||||
* 递归检查
|
* 递归检查
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static boolean checkRuleTree(SmsVo msg, RuleLine currentRuleLine) throws Exception {
|
public static boolean checkRuleTree(SmsVo msg, RuleLine currentRuleLine) throws Exception {
|
||||||
//该节点是否命中
|
//该节点是否命中
|
||||||
boolean currentAll = currentRuleLine.checkMsg(msg);
|
boolean currentAll = currentRuleLine.checkMsg(msg);
|
||||||
@ -126,7 +125,6 @@ public class RuleLineUtils {
|
|||||||
* 生成规则树
|
* 生成规则树
|
||||||
* 一行代表一个规则
|
* 一行代表一个规则
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static RuleLine generateRuleTree(String line, int lineNum, RuleLine parentRuleLine) throws Exception {
|
public static RuleLine generateRuleTree(String line, int lineNum, RuleLine parentRuleLine) throws Exception {
|
||||||
String[] words = line.split(" ");
|
String[] words = line.split(" ");
|
||||||
|
|
||||||
|
@ -82,6 +82,18 @@
|
|||||||
style="@style/rg_rb_style"
|
style="@style/rg_rb_style"
|
||||||
android:text="@string/sms_content" />
|
android:text="@string/sms_content" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnPackageName"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/package_name"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnInformContent"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/inform_content"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/btnMultiMatch"
|
android:id="@+id/btnMultiMatch"
|
||||||
style="@style/rg_rb_style"
|
style="@style/rg_rb_style"
|
||||||
@ -334,6 +346,31 @@
|
|||||||
android:text="@string/insert_extra"
|
android:text="@string/insert_extra"
|
||||||
tools:ignore="ButtonStyle,NestedWeights" />
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_sender_app"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_sender_app"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_content_app"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_content_app"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/bt_insert_time"
|
android:id="@+id/bt_insert_time"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
440
app/src/main/res/layout/alert_dialog_setview_rule_app.xml
Normal file
440
app/src/main/res/layout/alert_dialog_setview_rule_app.xml
Normal file
@ -0,0 +1,440 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="@string/match_sim_slot"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/radioGroupSimSlot"
|
||||||
|
style="@style/rg_style"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnSimSlotAll"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:checked="true"
|
||||||
|
android:text="@string/all" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnSimSlot1"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/sim1" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnSimSlot2"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/sim2" />
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="@string/match_field"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/radioGroupRuleFiled"
|
||||||
|
style="@style/rg_style"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnTranspondAll"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:checked="true"
|
||||||
|
android:text="@string/all" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnPhone"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/phone_number"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnContent"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/sms_content"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnPackageName"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/package_name" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnInformContent"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/inform_content" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnMultiMatch"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/multiple_matches" />
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/matchTypeLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="@string/match_type"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/radioGroupRuleCheck"
|
||||||
|
style="@style/rg_style"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnIs"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/btn_is" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnContain"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/btn_contain" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnNotContain"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/btn_not_contain" />
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/radioGroupRuleCheck2"
|
||||||
|
style="@style/rg_style"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnStartWith"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/btn_start_with" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnEndWith"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/btn_end_with" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnRegex"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/btn_regex" />
|
||||||
|
|
||||||
|
</RadioGroup>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/matchValueLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="@string/match_value"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/editTextRuleValue"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:autofillHints=""
|
||||||
|
android:ems="14"
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:gravity="start|top"
|
||||||
|
android:minLines="1"
|
||||||
|
android:text=""
|
||||||
|
tools:ignore="LabelFor" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_mu_rule_tips"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="3dp"
|
||||||
|
android:text="@string/mu_rule_tips2" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/select_sender"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btSetRuleSender"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minWidth="0dp"
|
||||||
|
android:minHeight="0dp"
|
||||||
|
android:text="@string/select" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/ruleSenderTv"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@android:color/white"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:text="@string/enable_custom_templates"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<Switch
|
||||||
|
android:id="@+id/switch_sms_template"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:gravity="end"
|
||||||
|
android:textSize="18sp"
|
||||||
|
tools:ignore="UseSwitchCompatOrMaterialXml" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_sms_template"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@android:color/white"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/custom_templates"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="@string/custom_templates_tips"
|
||||||
|
android:textSize="11sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/text_sms_template"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:autofillHints=""
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:gravity="start|top"
|
||||||
|
android:minLines="1"
|
||||||
|
android:text=""
|
||||||
|
tools:ignore="LabelFor" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_sender"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_sender"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_content"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_extra"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_extra"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_sender_app"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_sender_app"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_content_app"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_content_app"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_time"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_time"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_device_name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_device_name"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/buttonRuleTest"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/test"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/buttonRuleDel"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/del"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/buttonRuleOk"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/ok"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
442
app/src/main/res/layout/alert_dialog_setview_rule_call.xml
Normal file
442
app/src/main/res/layout/alert_dialog_setview_rule_call.xml
Normal file
@ -0,0 +1,442 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="@string/match_sim_slot"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/radioGroupSimSlot"
|
||||||
|
style="@style/rg_style"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnSimSlotAll"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:checked="true"
|
||||||
|
android:text="@string/all" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnSimSlot1"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/sim1" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnSimSlot2"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/sim2" />
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="@string/match_field"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/radioGroupRuleFiled"
|
||||||
|
style="@style/rg_style"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnTranspondAll"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:checked="true"
|
||||||
|
android:text="@string/all" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnPhone"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/phone_number" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnContent"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/sms_content"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnPackageName"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/package_name"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnInformContent"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/inform_content"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnMultiMatch"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/multiple_matches"
|
||||||
|
android:visibility="gone" />
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/matchTypeLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="@string/match_type"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/radioGroupRuleCheck"
|
||||||
|
style="@style/rg_style"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnIs"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/btn_is" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnContain"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/btn_contain" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnNotContain"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/btn_not_contain" />
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/radioGroupRuleCheck2"
|
||||||
|
style="@style/rg_style"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnStartWith"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/btn_start_with" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnEndWith"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/btn_end_with" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnRegex"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/btn_regex" />
|
||||||
|
|
||||||
|
</RadioGroup>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/matchValueLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="@string/match_value"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/editTextRuleValue"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:autofillHints=""
|
||||||
|
android:ems="14"
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:gravity="start|top"
|
||||||
|
android:minLines="1"
|
||||||
|
android:text=""
|
||||||
|
tools:ignore="LabelFor" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_mu_rule_tips"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="3dp"
|
||||||
|
android:text="@string/mu_rule_tips" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/select_sender"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btSetRuleSender"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minWidth="0dp"
|
||||||
|
android:minHeight="0dp"
|
||||||
|
android:text="@string/select" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/ruleSenderTv"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@android:color/white"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:text="@string/enable_custom_templates"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<Switch
|
||||||
|
android:id="@+id/switch_sms_template"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:gravity="end"
|
||||||
|
android:textSize="18sp"
|
||||||
|
tools:ignore="UseSwitchCompatOrMaterialXml" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_sms_template"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@android:color/white"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/custom_templates"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="@string/custom_templates_tips"
|
||||||
|
android:textSize="11sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/text_sms_template"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:autofillHints=""
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:gravity="start|top"
|
||||||
|
android:minLines="1"
|
||||||
|
android:text=""
|
||||||
|
tools:ignore="LabelFor" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_sender"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_sender"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_content"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_extra"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_extra"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_sender_app"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_sender_app"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_content_app"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_content_app"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_time"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_time"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_insert_device_name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="@string/insert_device_name"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/buttonRuleTest"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/test"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/buttonRuleDel"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/del"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/buttonRuleOk"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/ok"
|
||||||
|
tools:ignore="ButtonStyle,NestedWeights" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
@ -47,6 +47,8 @@
|
|||||||
<string name="reflashing_tips">Refreshing…</string>
|
<string name="reflashing_tips">Refreshing…</string>
|
||||||
<!--RuleActivity-->
|
<!--RuleActivity-->
|
||||||
<string name="setrule">Fwd Rule Settings</string>
|
<string name="setrule">Fwd Rule Settings</string>
|
||||||
|
<string name="setrule_call">Fwd Rule Settings of call</string>
|
||||||
|
<string name="setrule_app">Fwd Rule Settings of app</string>
|
||||||
<string name="delete_rule_title">Delete confirmation</string>
|
<string name="delete_rule_title">Delete confirmation</string>
|
||||||
<string name="delete_rule_tips">Are you sure to delete this rule entry?</string>
|
<string name="delete_rule_tips">Are you sure to delete this rule entry?</string>
|
||||||
<string name="delete_rule_toast">The rule entry has deleted.</string>
|
<string name="delete_rule_toast">The rule entry has deleted.</string>
|
||||||
@ -61,7 +63,9 @@
|
|||||||
<string name="match_sim_slot">Sim Slot</string>
|
<string name="match_sim_slot">Sim Slot</string>
|
||||||
<string name="match_field">Field</string>
|
<string name="match_field">Field</string>
|
||||||
<string name="phone_number">Phone No.</string>
|
<string name="phone_number">Phone No.</string>
|
||||||
|
<string name="package_name">PackageName</string>
|
||||||
<string name="sms_content">SMS</string>
|
<string name="sms_content">SMS</string>
|
||||||
|
<string name="inform_content">Inform content</string>
|
||||||
<string name="multiple_matches">Multiple</string>
|
<string name="multiple_matches">Multiple</string>
|
||||||
<string name="match_type">Type</string>
|
<string name="match_type">Type</string>
|
||||||
<string name="btn_is">Is</string>
|
<string name="btn_is">Is</string>
|
||||||
@ -129,7 +133,7 @@
|
|||||||
<string name="ServerChanSendKey">ServerChan\'s SendKey</string>
|
<string name="ServerChanSendKey">ServerChan\'s SendKey</string>
|
||||||
<string name="TelegramApiToken">ApiToken or Custom address</string>
|
<string name="TelegramApiToken">ApiToken or Custom address</string>
|
||||||
<string name="TelegramChatId">ChatId</string>
|
<string name="TelegramChatId">ChatId</string>
|
||||||
<string name="WebNotifyMethod">Method</string>
|
<string name="WebNotifyMethod" formatted="false">Method</string>
|
||||||
<string name="WebNotifyWebServer">WebServer e.g. https://a.b.com/msg?token=xyz</string>
|
<string name="WebNotifyWebServer">WebServer e.g. https://a.b.com/msg?token=xyz</string>
|
||||||
<string name="WebNotifyWebParams">WebParams e.g. payload=%7B%22text%22%3A%22[msg]%22%7D [msg] will be replaced with text message content. \nSupport Json format, for example: {"text":[MSG]}.\n Note: MSG is automatically utF-8 encoded in addition to JSON format</string>
|
<string name="WebNotifyWebParams">WebParams e.g. payload=%7B%22text%22%3A%22[msg]%22%7D [msg] will be replaced with text message content. \nSupport Json format, for example: {"text":[MSG]}.\n Note: MSG is automatically utF-8 encoded in addition to JSON format</string>
|
||||||
<string name="WebNotifySecret">Secret (If empty, sign is not counted)</string>
|
<string name="WebNotifySecret">Secret (If empty, sign is not counted)</string>
|
||||||
@ -154,7 +158,9 @@
|
|||||||
<string name="custom_templates">Custom templates</string>
|
<string name="custom_templates">Custom templates</string>
|
||||||
<string name="custom_templates_tips">Tip:Insert labels as needed;Leave blank to default template</string>
|
<string name="custom_templates_tips">Tip:Insert labels as needed;Leave blank to default template</string>
|
||||||
<string name="insert_sender">Phone</string>
|
<string name="insert_sender">Phone</string>
|
||||||
|
<string name="insert_sender_app">PackageName</string>
|
||||||
<string name="insert_content">SMS</string>
|
<string name="insert_content">SMS</string>
|
||||||
|
<string name="insert_content_app">InformContent</string>
|
||||||
<string name="insert_extra">SIM</string>
|
<string name="insert_extra">SIM</string>
|
||||||
<string name="insert_time">Time</string>
|
<string name="insert_time">Time</string>
|
||||||
<string name="insert_device_name">Device</string>
|
<string name="insert_device_name">Device</string>
|
||||||
@ -173,6 +179,7 @@
|
|||||||
<string name="sim1" tools:ignore="Typos">SIM1</string>
|
<string name="sim1" tools:ignore="Typos">SIM1</string>
|
||||||
<string name="sim2" tools:ignore="Typos">SIM2</string>
|
<string name="sim2" tools:ignore="Typos">SIM2</string>
|
||||||
<string name="mu_rule_tips">多重匹配规则示例:\n \n 并且 是 手机号 相等 10086\n 或者 是 手机号 相等 10011\n 并且 是 短信内容 包含 欠费\n \n 以上规则表示:收到短信,并且(手机号是10086 或者 手机号是10010),并且 短信内容 包含 欠费 时转发短信\n 注意:每行开始的空格代表层级,太过复杂的多重规则可能导致内存占用很大!</string>
|
<string name="mu_rule_tips">多重匹配规则示例:\n \n 并且 是 手机号 相等 10086\n 或者 是 手机号 相等 10011\n 并且 是 短信内容 包含 欠费\n \n 以上规则表示:收到短信,并且(手机号是10086 或者 手机号是10010),并且 短信内容 包含 欠费 时转发短信\n 注意:每行开始的空格代表层级,太过复杂的多重规则可能导致内存占用很大!</string>
|
||||||
|
<string name="mu_rule_tips2">多重匹配规则示例:\n \n 并且 是 包名 相等 com.tencent.mm\n 或者 是 包名 相等 com.tencent.mm\n 并且 是 通知内容 包含 欠费\n \n 以上规则表示:收到APP通知,并且(包名是com.tencent.mm 或者 包名是com.tencent.mm),并且 通知内容 包含 欠费 时转发通知\n 注意:每行开始的空格代表层级,太过复杂的多重规则可能导致内存占用很大!</string>
|
||||||
<string name="post">POST</string>
|
<string name="post">POST</string>
|
||||||
<string name="get">GET</string>
|
<string name="get">GET</string>
|
||||||
<!--CloneActivity-->
|
<!--CloneActivity-->
|
||||||
|
@ -46,11 +46,13 @@
|
|||||||
<string name="release_tips">松开可以刷新!</string>
|
<string name="release_tips">松开可以刷新!</string>
|
||||||
<string name="reflashing_tips">正在刷新…</string>
|
<string name="reflashing_tips">正在刷新…</string>
|
||||||
<!--RuleActivity-->
|
<!--RuleActivity-->
|
||||||
<string name="setrule">设置转发规则</string>
|
<string name="setrule">设置短信转发规则</string>
|
||||||
|
<string name="setrule_call">设置来电转发规则</string>
|
||||||
|
<string name="setrule_app">设置APP通知转发规则</string>
|
||||||
<string name="delete_rule_title">规则删除确认</string>
|
<string name="delete_rule_title">规则删除确认</string>
|
||||||
<string name="delete_rule_tips">确定删除该条规则?</string>
|
<string name="delete_rule_tips">确定删除该条规则?</string>
|
||||||
<string name="delete_rule_toast">该条规则已经删除!</string>
|
<string name="delete_rule_toast">该条规则已经删除!</string>
|
||||||
<string name="new_sender_first">请先创建发送通道再选择</string>
|
<string name="new_sender_first">请选择发送通道(若无,请先添加)</string>
|
||||||
<string name="add_sender_first">请先去设置发送通道页面添加</string>
|
<string name="add_sender_first">请先去设置发送通道页面添加</string>
|
||||||
<string name="select_sender">选择发送通道</string>
|
<string name="select_sender">选择发送通道</string>
|
||||||
<string name="rule_tester">规则测试</string>
|
<string name="rule_tester">规则测试</string>
|
||||||
@ -61,7 +63,9 @@
|
|||||||
<string name="match_sim_slot">设置匹配的卡槽</string>
|
<string name="match_sim_slot">设置匹配的卡槽</string>
|
||||||
<string name="match_field">设置匹配的字段</string>
|
<string name="match_field">设置匹配的字段</string>
|
||||||
<string name="phone_number">手机号</string>
|
<string name="phone_number">手机号</string>
|
||||||
|
<string name="package_name">APP包名</string>
|
||||||
<string name="sms_content">短信内容</string>
|
<string name="sms_content">短信内容</string>
|
||||||
|
<string name="inform_content">通知内容</string>
|
||||||
<string name="multiple_matches">多重匹配</string>
|
<string name="multiple_matches">多重匹配</string>
|
||||||
<string name="match_type">设置匹配的模式</string>
|
<string name="match_type">设置匹配的模式</string>
|
||||||
<string name="btn_is">是</string>
|
<string name="btn_is">是</string>
|
||||||
@ -129,7 +133,7 @@
|
|||||||
<string name="ServerChanSendKey">设置Server酱·Turbo版的SendKey</string>
|
<string name="ServerChanSendKey">设置Server酱·Turbo版的SendKey</string>
|
||||||
<string name="TelegramApiToken">设置Telegram机器人的ApiToken 或 自定义地址</string>
|
<string name="TelegramApiToken">设置Telegram机器人的ApiToken 或 自定义地址</string>
|
||||||
<string name="TelegramChatId">设置被通知人(或群组)的ChatId</string>
|
<string name="TelegramChatId">设置被通知人(或群组)的ChatId</string>
|
||||||
<string name="WebNotifyMethod">请求方式</string>
|
<string name="WebNotifyMethod" formatted="false">请求方式</string>
|
||||||
<string name="WebNotifyWebServer">设置WebServer:例如:https://a.b.com/msg?token=xyz</string>
|
<string name="WebNotifyWebServer">设置WebServer:例如:https://a.b.com/msg?token=xyz</string>
|
||||||
<string name="WebNotifyWebParams">设置WebParams:例如:payload=%7B%22text%22%3A%22[msg]%22%7D [msg]将被替换成短信内容。\n支持Json格式,例如:{"text":[msg]}。\n注意:除JSON格式外,msg会自动进行UTF-8编码</string>
|
<string name="WebNotifyWebParams">设置WebParams:例如:payload=%7B%22text%22%3A%22[msg]%22%7D [msg]将被替换成短信内容。\n支持Json格式,例如:{"text":[msg]}。\n注意:除JSON格式外,msg会自动进行UTF-8编码</string>
|
||||||
<string name="WebNotifySecret">设置Secret:置空则不计算sign</string>
|
<string name="WebNotifySecret">设置Secret:置空则不计算sign</string>
|
||||||
@ -154,7 +158,9 @@
|
|||||||
<string name="custom_templates">转发信息模版</string>
|
<string name="custom_templates">转发信息模版</string>
|
||||||
<string name="custom_templates_tips">Tip:按需插入内容标签;留空使用默认模版</string>
|
<string name="custom_templates_tips">Tip:按需插入内容标签;留空使用默认模版</string>
|
||||||
<string name="insert_sender">来源号码</string>
|
<string name="insert_sender">来源号码</string>
|
||||||
|
<string name="insert_sender_app">APP包名</string>
|
||||||
<string name="insert_content">短信内容</string>
|
<string name="insert_content">短信内容</string>
|
||||||
|
<string name="insert_content_app">通知内容</string>
|
||||||
<string name="insert_extra">卡槽信息</string>
|
<string name="insert_extra">卡槽信息</string>
|
||||||
<string name="insert_time">接收时间</string>
|
<string name="insert_time">接收时间</string>
|
||||||
<string name="insert_device_name">设备名称</string>
|
<string name="insert_device_name">设备名称</string>
|
||||||
@ -173,6 +179,7 @@
|
|||||||
<string name="sim1" tools:ignore="Typos">SIM1</string>
|
<string name="sim1" tools:ignore="Typos">SIM1</string>
|
||||||
<string name="sim2" tools:ignore="Typos">SIM2</string>
|
<string name="sim2" tools:ignore="Typos">SIM2</string>
|
||||||
<string name="mu_rule_tips">多重匹配规则示例:\n \n 并且 是 手机号 相等 10086\n 或者 是 手机号 相等 10011\n 并且 是 短信内容 包含 欠费\n \n 以上规则表示:收到短信,并且(手机号是10086 或者 手机号是10010),并且 短信内容 包含 欠费 时转发短信\n 注意:每行开始的空格代表层级,太过复杂的多重规则可能导致内存占用很大!</string>
|
<string name="mu_rule_tips">多重匹配规则示例:\n \n 并且 是 手机号 相等 10086\n 或者 是 手机号 相等 10011\n 并且 是 短信内容 包含 欠费\n \n 以上规则表示:收到短信,并且(手机号是10086 或者 手机号是10010),并且 短信内容 包含 欠费 时转发短信\n 注意:每行开始的空格代表层级,太过复杂的多重规则可能导致内存占用很大!</string>
|
||||||
|
<string name="mu_rule_tips2">多重匹配规则示例:\n \n 并且 是 APP包名 相等 com.tencent.mm\n 或者 是 APP包名 相等 com.tencent.mm\n 并且 是 通知内容 包含 欠费\n \n 以上规则表示:收到APP通知,并且(APP包名是com.tencent.mm 或者 APP包名是com.tencent.mm),并且 通知内容 包含 欠费 时转发通知\n 注意:每行开始的空格代表层级,太过复杂的多重规则可能导致内存占用很大!</string>
|
||||||
<string name="post">POST</string>
|
<string name="post">POST</string>
|
||||||
<string name="get">GET</string>
|
<string name="get">GET</string>
|
||||||
<string name="local_ip">本机IP:</string>
|
<string name="local_ip">本机IP:</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user