优化:发送通道必填字段校验与界面优化

pull/115/head
pppscn 2 years ago
parent 336df5008d
commit affac39bed

@ -1,7 +1,7 @@
![SmsForwarder](pic/SmsForwarder.png)
# SmsForwarder-短信转发器
[English Version](#SmsForwarder)
[English Version](README_en.md)
[![GitHub release](https://img.shields.io/github/release/pppscn/SmsForwarder.svg)](https://github.com/pppscn/SmsForwarder/releases) [![GitHub stars](https://img.shields.io/github/stars/pppscn/SmsForwarder)](https://github.com/pppscn/SmsForwarder/stargazers) [![GitHub forks](https://img.shields.io/github/forks/pppscn/SmsForwarder)](https://github.com/pppscn/SmsForwarder/network/members) [![GitHub issues](https://img.shields.io/github/issues/pppscn/SmsForwarder)](https://github.com/pppscn/SmsForwarder/issues) [![GitHub license](https://img.shields.io/github/license/pppscn/SmsForwarder)](https://github.com/pppscn/SmsForwarder/blob/main/LICENSE)
@ -94,7 +94,7 @@
| ---- | ---- | ---- | ---- |
| ![前台服务常驻状态栏](pic/taskbar.jpg "前台服务常驻状态栏") | ![应用主界面](pic/main.png "应用主界面") | ![转发规则](pic/rule.jpg "转发规则") | ![转发详情](pic/maindetail.jpg "转发详情") |
| 添加/编辑转发规则测试 | 多重匹配规则 | 支持以下转发方式(发送通道) | 添加/编辑发送通道钉钉 |
| ![添加/编辑转发规则](pic/ruleset.png "添加/编辑转发规则") | ![多重匹配规则](pic/multimatch.png "多重匹配规则") | ![发送通道](pic/sender.jpg "发送通道") | ![添加/编辑发送通道钉钉](pic/sendersetdingding.jpg "添加/编辑发送通道钉钉") |
| ![添加/编辑转发规则](pic/ruleset.png "添加/编辑转发规则") | ![多重匹配规则](pic/multimatch.png "多重匹配规则") | ![发送通道](pic/sender.png "发送通道") | ![添加/编辑发送通道钉钉](pic/sendersetdingding.jpg "添加/编辑发送通道钉钉") |
| 添加/编辑发送通道邮箱 | 添加/编辑发送通道Bark | 添加/编辑发送通道网页通知 | 添加/编辑发送通道企业微信群机器人 |
| ![添加/编辑发送通道邮箱](pic/sendersetemail.jpg "添加/编辑发送通道邮箱") | ![添加/编辑发送通道Bark](pic/sendersetbark.png "添加/编辑发送通道Bark") | ![添加/编辑发送通道网页通知](pic/sendersetwebnotify.jpg "添加/编辑发送通道网页通知") | ![添加/编辑发送通道企业微信群机器人](pic/sendersetqywechat.jpg "添加/编辑发送通道企业微信群机器人") |
| 添加/编辑发送通道Telegram机器人 | 添加/编辑发送通道Server酱·Turbo版 | 添加/编辑发送通道企业微信应用 | 应用设置 |
@ -138,148 +138,3 @@
## LICENSE
BSD
--------
![SmsForwarder](pic/SmsForwarder.png)
# SmsForwarder
[中文版](#SmsForwarder-短信转发器)
[![GitHub release](https://img.shields.io/github/release/pppscn/SmsForwarder.svg)](https://github.com/pppscn/SmsForwarder/releases) [![GitHub stars](https://img.shields.io/github/stars/pppscn/SmsForwarder)](https://github.com/pppscn/SmsForwarder/stargazers) [![GitHub forks](https://img.shields.io/github/forks/pppscn/SmsForwarder)](https://github.com/pppscn/SmsForwarder/network/members) [![GitHub issues](https://img.shields.io/github/issues/pppscn/SmsForwarder)](https://github.com/pppscn/SmsForwarder/issues) [![GitHub license](https://img.shields.io/github/license/pppscn/SmsForwarder)](https://github.com/pppscn/SmsForwarder/blob/main/LICENSE)
SmsForwarder - listens to SMS, incoming calls, and App notifications on Android mobile devices, and forward according to user defined rules to another App/device, including DingTalk, WeCom and WeCom Group Bot, Feishi Bot, E-mail, Bark, Webhook, Telegram Bot, ServerChan, PushPlus, SMS, etc.
### Download
> ⚠ Repo address: https://github.com/pppscn/SmsForwarder/releases
> ⚠ Repo mirror in China: https://gitee.com/pp/SmsForwarder/releases
> ⚠ Internet storage: https://wws.lanzoui.com/b025yl86h, access password: `pppscn`
> ⚠ CoolAPK.com: https://www.coolapk.com/apk/com.idormy.sms.forwarder
### Manual
> ⚠ GitHub: https://github.com/pppscn/SmsForwarder/wiki
> ⚠ Gitee: https://gitee.com/pp/SmsForwarder/wikis/pages
--------
## NOTE
* Any code/APK of `SmsForwarder` related to the this repository is for test, study, and research only, commercial use is **prohibited**. Legality, accuracy, completeness and validity of any code/APK of this repo is guaranteed by **NOBODY**, and shall only be determined by User.
* `pppscn` and/or any other Contributor to this repo is **NOT** responsible for any consequences (including but not limited to privacy leakage) arising from any user's direct or indirect use or dissemination of any code or APK of `SmsForwarder`, regardless of whether such use is in accordance with the laws of the country or territory where such user locates or such use or dissemination occurs.
* Should any entity finds the code/APK of this repo infringing their rights, please provide notice and identity and proprietorship document, and we will delete relating code/APK after examining such document.
* Privacy: `SmsForwarder` collects absolutely **NO** any of your personal data!! Except 1) version information to umeng.com for stats as the App starts, and 2) version number when manually check for update, `SmsForwarder` is **NOT** sending any data without users' knowledge.
--------
## Features and standards
**Simplicity** - `SmsForwarder` does two things only: Listen to "SMS service/Incoming calls/App notifications", and forward according to rules specified by user.
Benefit by simplicity:
* **E**fficient: (It's inconvenient to read the security codes such as OTP on a mobile phone, when you are using another device; and no solution satisfices our needs)
> + AirDroid: Too many functionalities, power consuming, requiring to many permissions, data relayed by a 3rd party, paid premium service...
> + IFTTT: Too many functionalities, power consuming, requiring to many permissions, data relayed by a 3rd party, paid premium service...
> + And other Apps (e.g. Tasker) with similar features.
* **E**nergy friendly: listens to broadcast only when running, and forwards message only when texts are received and logs recent forwarding contents and status.
* **E**ndurance: "Simplicity is the Ultimate Sophistication." The simpler the code is, the less it errs or crashes; that is what make the app runs longer.
### Workflow:
![Workflow](pic/working_principle_en.png "Workflow")
### Features:
- [x] Listen to SMS service, and forward according to user-defined rules (SMS contents to destination);
- [x] Forward to DingTalk Bot (to a group chat and @SOMBODY);
- [x] Forward to E-mail (SMTP with SSL encryption);
- [x] Forward to Bark;
- [x] Forward to webhook (a single web page [sending POST/GET requests to a designated URL](doc/POST_WEB.md));
- [x] Forward to WeCom Bots;
- [x] Forward to WeCom enterprise channels;
- [x] Forward to ServerChan·Turbo;
- [x] Forward to Telegram Bots (Proxy support ready);
- [x] Forward to another mobile phone via SMS [Note: Paid service, carriers may charge for SMS forwarding. SMS forwarding should apply with filtered rules when device has no Internet access.]
- [x] Check for new version and upgrade;
- [x] Cache purge;
- [x] Compatible with Android 5.xx, 6.xx, 7.xx, 8.xx, 9.xx, and 10.xx;
- [x] Support for dual SIM slots smartphones and label different slots/carrier/phone number (if available);
- [x] Support for multi-level rules;
- [x] Support for customized labeling of SIM slots and device, and customized forwarding templates;
- [x] Support for rules with regular expression
- [x] Support for rules for different SIM slots;
- [x] Forward missed call information (forwarded by SIM1 slot by default);
- [x] Retry 5 times after a failed request (customized interval time, stop retrying once successfully request);
- [x] Forward to FeiShu Bot;
- [x] Customized scheme (forwarder://main) wake up other Apps;
- [x] Monitor of battery status changes;
- [x] I18n support (Chinese and English currently);
- [x] Support for setting import and export functions (One-key cloning);
- [x] Listen to notifications of other Apps and forward;
- [x] Forward to PushPlus;
- [x] Support for customized template of forwarding rules (default template overrides if left blank);
- [x] Support for variables in regular expression of forwarding rules;
--------
### Screenshots :
| Docking in Ntf. screen | Main screen | Fwding rules | Fwding details |
| ---- | ---- | ---- | ---- |
| ![Docking in Ntf. screen](pic/taskbar.jpg "Docking in Ntf. screen") | ![Main screen](pic/main.png "Main screen") | ![Forwarding rules](pic/rule.jpg "Forwarding rules") | ![Fwding details](pic/maindetail.jpg "Fwding details") |
| Test of a Fw. rule | Multiple filters | Supported senders | Add/Edit DingTalk sender |
| ![Test of a Fw. rule](pic/ruleset.png "Test of a Fw. rule") | ![Multiple filters](pic/multimatch.png "Multiple filters") | ![Supported senders](pic/sender.jpg "Supported senders") | ![Add/Edit DingTalk sender](pic/sendersetdingding.jpg "Add/Edit DingTalk sender") |
| Add/Edit E-mail sender | Add/Edit Bark sender | Add/Edit Webhook | Add/Edit WeCom Group Bot sender |
| ![Add/Edit E-mail sender](pic/sendersetemail.jpg "Add/Edit E-mail sender") | ![Add/Edit Bark sender](pic/sendersetbark.png "Add/Edit Bark sender") | ![Add/Edit Webhook sender](pic/sendersetwebnotify.jpg "Add/Edit Webhook sender") | ![Add/Edit WeCom group bot](pic/sendersetqywechat.jpg "Add/Edit WeCom group bot") |
| Add/Edit Telegram Bot sender | Add/Edit ServerChan Turbo sender | Add/Edit WeCom Group sender | Settings |
| ![Add/Edit Telegram bot](pic/sendertelegram.jpg "Add/Edit Telegram bot") | ![Add/Edit ServerChan Tubo sender](pic/senderserverchan.jpg "Add/Edit ServerChan Tubo sender") | ![Add/Edit WeCom Enterprise channel sender](pic/sendersetqywxapp.jpg "Add/Edit WeCom Enterprise channel sender") | ![Settings](pic/setting.jpg "Settings") |
| About/Update | RegEx & SIM filters | SMS fwding template w/ SIM label | Add/Edit an SMS fwding rule |
| ![Online update](pic/update.jpg "Online update") | ![RegEx & SIM filters](pic/regex.jpg "RegEx & SIM filters") | ![SMS fwding template w/ SIM label](pic/siminfo.jpg "SMS fwding template w/ SIM label") | ![Add/Edit SMS fwder.](pic/sendersetsms.jpg "Add/Edit SMS fwder.") |
| Add/Edit FeiShu Bot sender | Import and export (One-key Cloning) | Listen to ntf. of other Apps and fw. | Get App pkg name(s) |
| ![Add/Edit FeiShu sender](pic/senderfeishu.png "Add/Edit FeiShu sender") | ![New setting import & export function (One-key Clone)](pic/clone.png "New setting import & export function (One-key Cloning)") | ![Listen to notifications of other Apps and forward](pic/app_notify.png "Listen to notifications of other Apps and forward") | ![Getting list of all Apps (to get App package name)](pic/app_list.png "Getting list of all Apps (to get App package name)") |
--------
## Feedback and suggestions:
+ Submit an issue or Pull Request.
+ Join group chat (only Chinese groups/channels available currently)
| DingTalk | QQ user group #1: 562854376 | QQ user group #2: 31330492 | WeCom |
| ---- | ---- | ---- | ---- |
| ![钉钉客户群](pic/dingtalk.png "钉钉客户群") | ![QQ交流群562854376](pic/qqgroup_1.jpg "QQ交流群562854376") | ![QQ交流群31330492](pic/qqgroup_2.jpg "QQ交流群31330492") | ![企业微信群](pic/qywechat.png "企业微信群") |
## Acknowledgements
> Thanks to the projects below, `SmsForwarder` won't exists without them!
+ https://github.com/xiaoyuanhost/TranspondSms (Foundation of `SmsForwarder`)
+ https://github.com/square/okhttp (http communications)
+ https://github.com/xuexiangjys/XUpdateAPI (online update)
+ https://github.com/mailhu/emailkit (email sending)
+ https://github.com/alibaba/fastjson (json parsing)
+ https://github.com/getActivity/XXPermissions (permission requiring)
+ [![GitHub license](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg?_ga=2.126618957.1361252949.1638261367-1417196221.1635638144&_gl=1*1pfl3dq*_ga*MTQxNzE5NjIyMS4xNjM1NjM4MTQ0*_ga_V0XZL7QHEB*MTYzODMzMjA4OC43LjAuMTYzODMzMjA5Ny4w)](https://jb.gg/OpenSourceSupport) (License Certificate for JetBrains All Products Pack)
--------
## Star this repo if you find this application useful!
[![starcharts stargazers over time](https://starchart.cc/pppscn/SmsForwarder.svg)](https://github.com/pppscn/SmsForwarder)
--------
## LICENSE
BSD

@ -1,6 +1,8 @@
![SmsForwarder](pic/SmsForwarder.png)
# SmsForwarder
[中文版](README.md)
[![GitHub release](https://img.shields.io/github/release/pppscn/SmsForwarder.svg)](https://github.com/pppscn/SmsForwarder/releases) [![GitHub stars](https://img.shields.io/github/stars/pppscn/SmsForwarder)](https://github.com/pppscn/SmsForwarder/stargazers) [![GitHub forks](https://img.shields.io/github/forks/pppscn/SmsForwarder)](https://github.com/pppscn/SmsForwarder/network/members) [![GitHub issues](https://img.shields.io/github/issues/pppscn/SmsForwarder)](https://github.com/pppscn/SmsForwarder/issues) [![GitHub license](https://img.shields.io/github/license/pppscn/SmsForwarder)](https://github.com/pppscn/SmsForwarder/blob/main/LICENSE)
@ -53,7 +55,7 @@ Benefit by simplicity:
### Workflow:
![工作流程](pic/working_principle.png "工作流程")
![Workflow](pic/working_principle_en.png "Workflow")
### Features:
@ -95,7 +97,7 @@ Benefit by simplicity:
| ---- | ---- | ---- | ---- |
| ![Docking in Ntf. screen](pic/taskbar.jpg "Docking in Ntf. screen") | ![Main screen](pic/main.png "Main screen") | ![Forwarding rules](pic/rule.jpg "Forwarding rules") | ![Fwding details](pic/maindetail.jpg "Fwding details") |
| Test of a Fw. rule | Multiple filters | Supported senders | Add/Edit DingTalk sender |
| ![Test of a Fw. rule](pic/ruleset.png "Test of a Fw. rule") | ![Multiple filters](pic/multimatch.png "Multiple filters") | ![Supported senders](pic/sender.jpg "Supported senders") | ![Add/Edit DingTalk sender](pic/sendersetdingding.jpg "Add/Edit DingTalk sender") |
| ![Test of a Fw. rule](pic/ruleset.png "Test of a Fw. rule") | ![Multiple filters](pic/multimatch.png "Multiple filters") | ![Supported senders](pic/sender.png "Supported senders") | ![Add/Edit DingTalk sender](pic/sendersetdingding.jpg "Add/Edit DingTalk sender") |
| Add/Edit E-mail sender | Add/Edit Bark sender | Add/Edit Webhook | Add/Edit WeCom Group Bot sender |
| ![Add/Edit E-mail sender](pic/sendersetemail.jpg "Add/Edit E-mail sender") | ![Add/Edit Bark sender](pic/sendersetbark.png "Add/Edit Bark sender") | ![Add/Edit Webhook sender](pic/sendersetwebnotify.jpg "Add/Edit Webhook sender") | ![Add/Edit WeCom group bot](pic/sendersetqywechat.jpg "Add/Edit WeCom group bot") |
| Add/Edit Telegram Bot sender | Add/Edit ServerChan Turbo sender | Add/Edit WeCom Group sender | Settings |

@ -129,9 +129,10 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleDependency
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
//noinspection GradleDependency
implementation 'com.google.firebase:firebase-crashlytics-buildtools:2.5.2'
implementation 'com.google.android.material:material:1.3.0'
//noinspection GradleDynamicVersion
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'

@ -5,7 +5,10 @@ import android.app.Dialog;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.*;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
@ -29,12 +32,22 @@ import com.idormy.sms.forwarder.sender.SendUtil;
import com.idormy.sms.forwarder.sender.SmsHubApiTask;
import com.idormy.sms.forwarder.service.BatteryService;
import com.idormy.sms.forwarder.service.FrontService;
import com.idormy.sms.forwarder.utils.*;
import com.idormy.sms.forwarder.utils.CommonUtil;
import com.idormy.sms.forwarder.utils.HttpUtil;
import com.idormy.sms.forwarder.utils.KeepAliveUtils;
import com.idormy.sms.forwarder.utils.LogUtil;
import com.idormy.sms.forwarder.utils.NetUtil;
import com.idormy.sms.forwarder.utils.PhoneUtils;
import com.idormy.sms.forwarder.utils.SettingUtil;
import com.idormy.sms.forwarder.utils.SharedPreferencesHelper;
import com.idormy.sms.forwarder.utils.SmsUtil;
import com.idormy.sms.forwarder.utils.TimeUtil;
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;
import java.lang.reflect.Method;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
public class MainActivity extends AppCompatActivity implements RefreshListView.IRefreshListener {
@ -436,7 +449,7 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I
@SuppressLint({"ResourceType", "InflateParams"})
public void dialog() {
dialog = new Dialog(this, R.style.dialog);
inflate = LayoutInflater.from(MainActivity.this).inflate(R.layout.diaologlayout, null);
inflate = LayoutInflater.from(MainActivity.this).inflate(R.layout.diaolog_privacy_policy, null);
TextView succsebtn = (TextView) inflate.findViewById(R.id.succsebtn);
TextView canclebtn = (TextView) inflate.findViewById(R.id.caclebtn);

@ -1,6 +1,8 @@
package com.idormy.sms.forwarder;
import static com.idormy.sms.forwarder.SenderActivity.NOTIFY;
import static com.idormy.sms.forwarder.model.RuleModel.STATUS_OFF;
import static com.idormy.sms.forwarder.model.RuleModel.STATUS_ON;
import android.annotation.SuppressLint;
import android.os.Bundle;
@ -27,6 +29,7 @@ import com.idormy.sms.forwarder.model.SenderModel;
import com.idormy.sms.forwarder.model.vo.SmsVo;
import com.idormy.sms.forwarder.sender.SendUtil;
import com.idormy.sms.forwarder.sender.SenderUtil;
import com.idormy.sms.forwarder.utils.CommonUtil;
import com.idormy.sms.forwarder.utils.RuleUtil;
import com.idormy.sms.forwarder.utils.SettingUtil;
import com.umeng.analytics.MobclickAgent;
@ -231,6 +234,11 @@ public class RuleActivity extends AppCompatActivity {
final LinearLayout matchValueLayout = view1.findViewById(R.id.matchValueLayout);
refreshSelectRadioGroupRuleFiled(radioGroupRuleFiled, radioGroupRuleCheck, radioGroupRuleCheck2, editTextRuleValue, tv_mu_rule_tips, matchTypeLayout, matchValueLayout);
//是否启用该规则
@SuppressLint("UseSwitchCompatOrMaterialCode") Switch switchRuleStatus = view1.findViewById(R.id.switch_rule_status);
if (ruleModel != null) {
switchRuleStatus.setChecked(ruleModel.getStatusChecked());
}
//自定义模板
@SuppressLint("UseSwitchCompatOrMaterialCode") Switch switchSmsTemplate = view1.findViewById(R.id.switch_sms_template);
EditText textSmsTemplate = view1.findViewById(R.id.text_sms_template);
@ -284,6 +292,7 @@ public class RuleActivity extends AppCompatActivity {
newRuleModel.setSwitchRegexReplace(switchRegexReplace.isChecked());
newRuleModel.setRegexReplace(regexReplace);
newRuleModel.setSenderId(Long.valueOf(senderId.toString()));
newRuleModel.setStatus(switchRuleStatus.isChecked() ? STATUS_ON : STATUS_OFF);
RuleUtil.addRule(newRuleModel);
initRules();
adapter.add(ruleModels);
@ -297,11 +306,11 @@ public class RuleActivity extends AppCompatActivity {
ruleModel.setSwitchRegexReplace(switchRegexReplace.isChecked());
ruleModel.setRegexReplace(regexReplace);
ruleModel.setSenderId(Long.valueOf(senderId.toString()));
ruleModel.setStatus(switchRuleStatus.isChecked() ? STATUS_ON : STATUS_OFF);
RuleUtil.updateRule(ruleModel);
initRules();
adapter.update(ruleModels);
}
show.dismiss();
});
@ -341,6 +350,7 @@ public class RuleActivity extends AppCompatActivity {
newRuleModel.setSmsTemplate(textSmsTemplate.getText().toString().trim());
newRuleModel.setSwitchRegexReplace(switchRegexReplace.isChecked());
newRuleModel.setRegexReplace(regexReplace);
newRuleModel.setStatus(switchRuleStatus.isChecked() ? STATUS_ON : STATUS_OFF);
testRule(newRuleModel, Long.valueOf(senderId.toString()));
} else {
@ -353,6 +363,7 @@ public class RuleActivity extends AppCompatActivity {
ruleModel.setSmsTemplate(textSmsTemplate.getText().toString().trim());
ruleModel.setSwitchRegexReplace(switchRegexReplace.isChecked());
ruleModel.setRegexReplace(regexReplace);
ruleModel.setStatus(switchRuleStatus.isChecked() ? STATUS_ON : STATUS_OFF);
testRule(ruleModel, Long.valueOf(senderId.toString()));
}
@ -374,49 +385,49 @@ public class RuleActivity extends AppCompatActivity {
buttonInsertSender.setOnClickListener(view -> {
textSmsTemplate.setFocusable(true);
textSmsTemplate.requestFocus();
insertOrReplaceText2Cursor(textSmsTemplate, "{{来源号码}}");
CommonUtil.insertOrReplaceText2Cursor(textSmsTemplate, "{{来源号码}}");
});
Button buttonInsertContent = view1.findViewById(R.id.bt_insert_content);
buttonInsertContent.setOnClickListener(view -> {
textSmsTemplate.setFocusable(true);
textSmsTemplate.requestFocus();
insertOrReplaceText2Cursor(textSmsTemplate, "{{短信内容}}");
CommonUtil.insertOrReplaceText2Cursor(textSmsTemplate, "{{短信内容}}");
});
Button buttonInsertSenderApp = view1.findViewById(R.id.bt_insert_sender_app);
buttonInsertSenderApp.setOnClickListener(view -> {
textSmsTemplate.setFocusable(true);
textSmsTemplate.requestFocus();
insertOrReplaceText2Cursor(textSmsTemplate, "{{APP包名}}");
CommonUtil.insertOrReplaceText2Cursor(textSmsTemplate, "{{APP包名}}");
});
Button buttonInsertContentApp = view1.findViewById(R.id.bt_insert_content_app);
buttonInsertContentApp.setOnClickListener(view -> {
textSmsTemplate.setFocusable(true);
textSmsTemplate.requestFocus();
insertOrReplaceText2Cursor(textSmsTemplate, "{{通知内容}}");
CommonUtil.insertOrReplaceText2Cursor(textSmsTemplate, "{{通知内容}}");
});
Button buttonInsertExtra = view1.findViewById(R.id.bt_insert_extra);
buttonInsertExtra.setOnClickListener(view -> {
textSmsTemplate.setFocusable(true);
textSmsTemplate.requestFocus();
insertOrReplaceText2Cursor(textSmsTemplate, "{{卡槽信息}}");
CommonUtil.insertOrReplaceText2Cursor(textSmsTemplate, "{{卡槽信息}}");
});
Button buttonInsertTime = view1.findViewById(R.id.bt_insert_time);
buttonInsertTime.setOnClickListener(view -> {
textSmsTemplate.setFocusable(true);
textSmsTemplate.requestFocus();
insertOrReplaceText2Cursor(textSmsTemplate, "{{接收时间}}");
CommonUtil.insertOrReplaceText2Cursor(textSmsTemplate, "{{接收时间}}");
});
Button buttonInsertDeviceName = view1.findViewById(R.id.bt_insert_device_name);
buttonInsertDeviceName.setOnClickListener(view -> {
textSmsTemplate.setFocusable(true);
textSmsTemplate.requestFocus();
insertOrReplaceText2Cursor(textSmsTemplate, "{{设备名称}}");
CommonUtil.insertOrReplaceText2Cursor(textSmsTemplate, "{{设备名称}}");
});
//正则替换
@ -433,12 +444,6 @@ public class RuleActivity extends AppCompatActivity {
}
private void insertOrReplaceText2Cursor(EditText editText, String str) {
int start = Math.max(editText.getSelectionStart(), 0);
int end = Math.max(editText.getSelectionEnd(), 0);
editText.getText().replace(Math.min(start, end), Math.max(start, end), str, 0, str.length());
}
//当更新选择的字段的时候,更新之下各个选项的状态
// 如果设置了转发全部,禁用选择模式和匹配值输入
// 如果设置了多重规则,选择模式置为是

@ -63,6 +63,7 @@ public class RuleAdapter extends ArrayAdapter<RuleModel> {
viewHolder.ruleMatch = view.findViewById(R.id.rule_match);
viewHolder.ruleSender = view.findViewById(R.id.rule_sender);
viewHolder.ruleSenderImage = view.findViewById(R.id.rule_sender_image);
viewHolder.ruleSenderStatus = view.findViewById(R.id.rule_sender_status);
// 将ViewHolder存储在View中即将控件的实例存储在其中
view.setTag(viewHolder);
@ -78,6 +79,7 @@ public class RuleAdapter extends ArrayAdapter<RuleModel> {
if (!senderModel.isEmpty()) {
viewHolder.ruleSender.setText(senderModel.get(0).getName());
viewHolder.ruleSenderImage.setImageResource(senderModel.get(0).getImageId());
viewHolder.ruleSenderStatus.setImageResource(senderModel.get(0).getStatusImageId());
} else {
viewHolder.ruleSender.setText("");
}
@ -112,6 +114,7 @@ public class RuleAdapter extends ArrayAdapter<RuleModel> {
TextView ruleMatch;
TextView ruleSender;
ImageView ruleSenderImage;
ImageView ruleSenderStatus;
}
}

@ -20,6 +20,8 @@ import lombok.Data;
@SuppressWarnings({"unused"})
@Data
public class RuleModel {
public static final int STATUS_ON = 1;
public static final int STATUS_OFF = 0;
public static final String FILED_TRANSPOND_ALL = "transpond_all";
public static final String FILED_PHONE_NUM = "phone_num";
public static final String FILED_PACKAGE_NAME = "package_name";
@ -305,6 +307,11 @@ public class RuleModel {
return switchRegexReplace;
}
public boolean getStatusChecked() {
return !(status == STATUS_OFF);
}
@NonNull
@Override
public String toString() {
@ -315,6 +322,7 @@ public class RuleModel {
", value='" + value + '\'' +
", senderId=" + senderId +
", time=" + time +
", status=" + status +
'}';
}
}

@ -1,5 +1,7 @@
package com.idormy.sms.forwarder.model.vo;
import android.text.TextUtils;
import java.io.Serializable;
import lombok.Data;
@ -32,4 +34,12 @@ public class QYWXAppSettingVo implements Serializable {
return accessToken;
}
public boolean checkParms() {
if (TextUtils.isEmpty(corpID)) return false;
if (TextUtils.isEmpty(agentID)) return false;
if (TextUtils.isEmpty(secret)) return false;
return true;
}
}

@ -13,6 +13,7 @@ import static com.idormy.sms.forwarder.model.SenderModel.TYPE_SMS;
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_TELEGRAM;
import static com.idormy.sms.forwarder.model.SenderModel.TYPE_WEB_NOTIFY;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Handler;
import android.util.Log;
@ -86,13 +87,13 @@ public class SendUtil {
*
* rulesender
*
* @param context
* @param context
* @param handler
* @param logVo
*/
public static void resendMsgByLog(Context context, Handler handler, LogVo logVo) {
Log.d(TAG, logVo.toString());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@SuppressLint("SimpleDateFormat") SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = new Date();
try {
date = sdf.parse(logVo.getTime());

@ -8,6 +8,8 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.text.TextUtils;
import android.widget.EditText;
import androidx.core.app.ActivityCompat;
import androidx.core.app.NotificationManagerCompat;
@ -17,6 +19,8 @@ import com.idormy.sms.forwarder.service.NotifyService;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
*
@ -140,4 +144,22 @@ public class CommonUtil {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (dipValue * scale + 0.5f);
}
//是否合法的url
public static boolean checkUrl(String urls, boolean emptyResult) {
if (TextUtils.isEmpty(urls)) return emptyResult;
String regex = "(ht|f)tp(s?)\\:\\/\\/[0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*(:(0-9)*)*(\\/?)([a-zA-Z0-9\\-\\.\\?\\,\\'\\/\\\\&%\\+\\$#_=]*)?";
Pattern pat = Pattern.compile(regex);
Matcher mat = pat.matcher(urls.trim());
boolean result = mat.matches();
return result;
}
//焦点位置插入文本
public static void insertOrReplaceText2Cursor(EditText editText, String str) {
int start = Math.max(editText.getSelectionStart(), 0);
int end = Math.max(editText.getSelectionEnd(), 0);
editText.getText().replace(Math.min(start, end), Math.max(start, end), str, 0, str.length());
}
}

@ -46,6 +46,7 @@ public class RuleUtil {
values.put(RuleTable.RuleEntry.COLUMN_NAME_SIM_SLOT, ruleModel.getSimSlot());
values.put(RuleTable.RuleEntry.COLUMN_SMS_TEMPLATE, ruleModel.getSmsTemplate());
values.put(RuleTable.RuleEntry.COLUMN_REGEX_REPLACE, ruleModel.getRegexReplace());
values.put(RuleTable.RuleEntry.COLUMN_NAME_STATUS, ruleModel.getStatus());
// Insert the new row, returning the primary key value of the new row
@ -64,6 +65,7 @@ public class RuleUtil {
values.put(RuleTable.RuleEntry.COLUMN_NAME_SIM_SLOT, ruleModel.getSimSlot());
values.put(RuleTable.RuleEntry.COLUMN_SMS_TEMPLATE, ruleModel.getSmsTemplate());
values.put(RuleTable.RuleEntry.COLUMN_REGEX_REPLACE, ruleModel.getRegexReplace());
values.put(RuleTable.RuleEntry.COLUMN_NAME_STATUS, ruleModel.getStatus());
String selection = RuleTable.RuleEntry._ID + " = ? ";
String[] whereArgs = {String.valueOf(ruleModel.getId())};
@ -103,6 +105,7 @@ public class RuleUtil {
RuleTable.RuleEntry.COLUMN_NAME_SIM_SLOT,
RuleTable.RuleEntry.COLUMN_SMS_TEMPLATE,
RuleTable.RuleEntry.COLUMN_REGEX_REPLACE,
RuleTable.RuleEntry.COLUMN_NAME_STATUS,
};
// Define 'where' part of query.
String selection = " 1 = 1 ";
@ -168,6 +171,8 @@ public class RuleUtil {
cursor.getColumnIndexOrThrow(RuleTable.RuleEntry.COLUMN_SMS_TEMPLATE));
String regexReplace = cursor.getString(
cursor.getColumnIndexOrThrow(RuleTable.RuleEntry.COLUMN_REGEX_REPLACE));
int itemStatus = cursor.getInt(
cursor.getColumnIndexOrThrow(RuleTable.RuleEntry.COLUMN_NAME_STATUS));
Log.d(TAG, "getRule: itemId" + itemId);
RuleModel ruleModel = new RuleModel();
@ -183,6 +188,7 @@ public class RuleUtil {
ruleModel.setSmsTemplate(smsTemplate);
ruleModel.setSwitchRegexReplace(!regexReplace.trim().isEmpty());
ruleModel.setRegexReplace(regexReplace);
ruleModel.setStatus(itemStatus);
tRules.add(ruleModel);
}

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
</vector>

@ -1,39 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="10dp"
android:layout_marginBottom="20dp"
android:background="@color/colorPrimary"
android:onClick="addSender"
android:scaleType="centerCrop"
android:src="@drawable/ic_add"
app:elevation="8dp" />
<TextView
android:id="@+id/help_tip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:gravity="center"
android:text="@string/sender_tips"
android:textColor="@color/colorPrimary" />
<ListView
android:id="@+id/list_view_sender"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/help_tip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/sender_tips"
android:textColor="@color/colorPrimary" />
<Button
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_margin="10dp"
android:background="@color/colorPrimary"
android:onClick="addSender"
android:padding="0dp"
android:text="@string/new_sender"
tools:ignore="UsingOnClickInXml" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>

@ -13,116 +13,17 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:background="@android:color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="15dp">
android:background="@android:color/transparent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/device_name"
android:layout_marginStart="15dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:text="功能开关"
android:textStyle="bold" />
<EditText
android:id="@+id/et_add_extra_device_mark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:autofillHints=""
android:ems="16"
android:inputType="text"
android:maxLines="1"
android:text=""
tools:ignore="LabelFor" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:background="@android:color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="15dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sim1_remark"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
android:text="@string/carrier_mobile"
android:textSize="9sp"
tools:ignore="SmallSp" />
</LinearLayout>
<EditText
android:id="@+id/et_add_extra_sim1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:autofillHints=""
android:ems="16"
android:inputType="text"
android:maxLines="1"
android:text=""
tools:ignore="LabelFor" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:background="@android:color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="15dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sim2_remark"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
android:text="@string/carrier_mobile"
android:textSize="9sp"
tools:ignore="SmallSp" />
</LinearLayout>
<EditText
android:id="@+id/et_add_extra_sim2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:autofillHints=""
android:ems="16"
android:inputType="text"
android:maxLines="1"
android:text=""
tools:ignore="LabelFor" />
</LinearLayout>
<LinearLayout
@ -196,6 +97,34 @@
android:text="@string/forward_missed_calls_tips"
android:textSize="9sp"
tools:ignore="SmallSp" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="未接来电"
android:id="@+id/chb_music"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="已接来电"
android:id="@+id/chb_game"
android:layout_toRightOf="@id/chb_music" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="去电"
android:id="@+id/chb_trip"
android:layout_toRightOf="@id/chb_game" />
</RelativeLayout>
</LinearLayout>
<Switch
@ -728,6 +657,121 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:background="@android:color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/device_name"
android:textStyle="bold" />
<EditText
android:id="@+id/et_add_extra_device_mark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:autofillHints=""
android:ems="16"
android:inputType="text"
android:maxLines="1"
android:text=""
tools:ignore="LabelFor" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:background="@android:color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="15dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sim1_remark"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
android:text="@string/carrier_mobile"
android:textSize="9sp"
tools:ignore="SmallSp" />
</LinearLayout>
<EditText
android:id="@+id/et_add_extra_sim1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:autofillHints=""
android:ems="16"
android:inputType="text"
android:maxLines="1"
android:text=""
tools:ignore="LabelFor" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:background="@android:color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="15dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sim2_remark"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
android:text="@string/carrier_mobile"
android:textSize="9sp"
tools:ignore="SmallSp" />
</LinearLayout>
<EditText
android:id="@+id/et_add_extra_sim2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:autofillHints=""
android:ems="16"
android:inputType="text"
android:maxLines="1"
android:text=""
tools:ignore="LabelFor" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<TextView
android:id="@+id/ItemTextView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:gravity="center"
android:maxLines="1"
android:text="@string/add_sender_title"
android:textColor="#ffffff"
android:textSize="18sp" />
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/MemuGridView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="20dp"
android:columnWidth="90dp"
android:gravity="center"
android:horizontalSpacing="10dp"
android:numColumns="auto_fit"
android:stretchMode="columnWidth"
android:verticalSpacing="10dp"></GridView>
</LinearLayout>

@ -20,7 +20,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_bark_name" />
android:text="@string/set_bark_name"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextBarkName"
@ -38,9 +39,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:checked="false"
android:checked="true"
android:ems="14"
android:gravity="end"
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
@ -48,27 +49,26 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/set_bark_server" />
android:text="@string/set_bark_server"
android:textStyle="bold" />
<!--<EditText
android:id="@+id/editTextBarkServer"
android:layout_width="wrap_content"
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
android:inputType="text"
android:text=""
tools:ignore="LabelFor" />-->
android:text="@string/set_bark_server_tips"
android:textSize="10sp"
tools:ignore="SmallSp" />
<com.idormy.sms.forwarder.view.ClearEditText
android:id="@+id/editTextBarkServer"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/line_bg_white_only_bottom_d8"
app:showEye="true"
@ -81,17 +81,26 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/set_bark_icon" />
android:text="@string/set_bark_icon"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/set_bark_icon_tips"
android:textSize="10sp"
tools:ignore="SmallSp" />
<EditText
android:id="@+id/editTextBarkIcon"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"

@ -20,7 +20,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_name" />
android:text="@string/set_name"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextDingdingName"
@ -39,7 +40,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:checked="false"
android:checked="true"
android:ems="14"
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
@ -55,17 +56,15 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dingding_token" />
android:text="@string/dingding_token"
android:textStyle="bold" />
<!--<EditText
android:id="@+id/editTextDingdingToken"
android:layout_width="wrap_content"
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
android:inputType="textPassword"
android:text=""
tools:ignore="LabelFor" />-->
android:text="@string/dingding_token_tips"
android:textSize="10sp"
tools:ignore="SmallSp" />
<com.idormy.sms.forwarder.view.ClearEditText
android:id="@+id/editTextDingdingToken"
@ -88,23 +87,14 @@
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dingding_secret" />
<!--<EditText
android:id="@+id/editTextDingdingSecret"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
android:inputType="textPassword"
android:text=""
tools:ignore="LabelFor" />-->
android:text="@string/dingding_secret"
android:textStyle="bold" />
<com.idormy.sms.forwarder.view.ClearEditText
android:id="@+id/editTextDingdingSecret"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/line_bg_white_only_bottom_d8"
app:showEye="true"
@ -119,45 +109,58 @@
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:orientation="vertical">
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dingding_at" />
android:text="@string/is_at_all"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextDingdingAtMobiles"
android:layout_width="wrap_content"
<Switch
android:id="@+id/switchDingdingAtAll"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:autofillHints=""
android:layout_weight="1"
android:gravity="end"
android:checked="true"
android:ems="14"
android:inputType="text"
android:text=""
tools:ignore="LabelFor" />
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayoutDingdingAtMobiles"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:orientation="horizontal">
android:layout_marginTop="10dp"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/is_at_all" />
android:text="@string/dingding_at"
android:textStyle="bold" />
<Switch
android:id="@+id/switchDingdingAtAll"
android:layout_width="0dp"
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:checked="false"
android:text="@string/dingding_at_tips"
android:textSize="10sp"
android:maxLines="1"
tools:ignore="SmallSp" />
<EditText
android:id="@+id/editTextDingdingAtMobiles"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
tools:ignore="UseSwitchCompatOrMaterialXml" />
android:inputType="text"
android:text=""
tools:ignore="LabelFor" />
</LinearLayout>
<LinearLayout

@ -40,7 +40,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:checked="false"
android:checked="true"
android:ems="14"
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
@ -92,18 +92,6 @@
android:layout_height="wrap_content"
android:text="@string/email_password" />
<!--<EditText
android:id="@+id/editTextEmailPsw"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:autofillHints=""
android:ems="14"
android:inputType="textPassword"
android:maxLines="1"
android:text=""
tools:ignore="LabelFor,TextFields" />-->
<com.idormy.sms.forwarder.view.ClearEditText
android:id="@+id/editTextEmailPsw"
android:layout_width="wrap_content"
@ -257,7 +245,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginStart="10dp"
android:text="@string/email"
android:text="@string/email_settings"
android:textSize="14sp"
android:textColor="@color/colorBlueGreyDark"
tools:ignore="HardcodedText" />

@ -20,7 +20,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_name" />
android:text="@string/set_name"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextFeishuName"
@ -39,7 +40,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:checked="false"
android:checked="true"
android:ems="14"
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
@ -49,16 +50,18 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/feishu_webhook" />
android:text="@string/feishu_webhook"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextFeishuWebhook"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
@ -73,22 +76,14 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/feishu_secret" />
<!--<EditText
android:id="@+id/editTextFeishuSecret"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
android:inputType="textPassword"
android:text=""
tools:ignore="LabelFor" />-->
android:text="@string/feishu_secret"
android:textStyle="bold" />
<com.idormy.sms.forwarder.view.ClearEditText
android:id="@+id/editTextFeishuSecret"

@ -20,7 +20,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_name" />
android:text="@string/set_name"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextGotifyName"
@ -39,9 +40,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:checked="false"
android:checked="true"
android:ems="14"
android:gravity="end"
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
@ -49,13 +50,29 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_marginRight="10dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/GotifyWebServer" />
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/GotifyWebServer"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@string/GotifyWebServerTips"
android:textSize="10sp"
tools:ignore="SmallSp" />
</LinearLayout>
<com.idormy.sms.forwarder.view.ClearEditText
android:id="@+id/editTextGotifyWebServer"
@ -67,15 +84,6 @@
app:textColorHint="@color/tv_gray_999999"
app:textSize="15sp" />
<!--<EditText
android:id="@+id/editTextGotifyWebServer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
android:inputType="textUri"
android:text=""
tools:ignore="LabelFor" />-->
</LinearLayout>
<LinearLayout
@ -83,8 +91,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="5dp"
android:background="@android:color/white"
android:gravity="center_vertical"
android:orientation="vertical">
@ -97,14 +105,16 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_template" />
android:text="@string/title_template"
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" />
android:textSize="10sp"
tools:ignore="SmallSp" />
</LinearLayout>
<EditText
@ -112,8 +122,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints=""
android:inputType="text"
android:gravity="start|top"
android:inputType="text"
android:minLines="1"
android:text=""
tools:ignore="LabelFor,TextFields" />
@ -184,7 +194,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/priority" />
android:text="@string/priority"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextGotifyPriority"
@ -192,9 +203,9 @@
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:autofillHints=""
android:digits="123456789"
android:ems="14"
android:inputType="number"
android:digits="123456789"
android:maxLength="1"
android:maxLines="1"
android:text="@string/_5"

@ -20,7 +20,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_name" />
android:text="@string/set_name"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextPushPlusName"
@ -38,9 +39,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:checked="false"
android:checked="true"
android:ems="14"
android:gravity="end"
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
@ -49,30 +50,34 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:orientation="horizontal">
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pushplus_token" />
<!--<EditText
android:id="@+id/editTextPushPlusToken"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:autofillHints=""
android:ems="14"
android:inputType="textPassword"
android:text=""
tools:ignore="LabelFor,TextFields" />-->
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pushplus_token"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@string/pushplus_token_tips"
android:textSize="10sp"
tools:ignore="SmallSp" />
</LinearLayout>
<com.idormy.sms.forwarder.view.ClearEditText
android:id="@+id/editTextPushPlusToken"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/line_bg_white_only_bottom_d8"
android:layout_marginStart="5dp"
android:background="@drawable/line_bg_white_only_bottom_d8"
app:showEye="true"
app:textColor="@color/tv_black_333333"
app:textColorHint="@color/tv_gray_999999"
@ -89,7 +94,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pushplus_topic" />
android:text="@string/pushplus_topic"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextPushPlusTopic"
@ -113,7 +119,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pushplus_template" />
android:text="@string/pushplus_template"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextPushPlusTemplate"
@ -137,7 +144,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pushplus_channel" />
android:text="@string/pushplus_channel"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextPushPlusChannel"
@ -161,7 +169,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pushplus_webhook" />
android:text="@string/pushplus_webhook"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextPushPlusWebhook"
@ -185,7 +194,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pushplus_callback" />
android:text="@string/pushplus_callback"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextPushPlusCallbackUrl"
@ -209,7 +219,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pushplus_valid_time" />
android:text="@string/pushplus_valid_time"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextPushPlusValidTime"

@ -41,7 +41,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:checked="false"
android:checked="true"
android:ems="14"
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
@ -111,21 +111,11 @@
android:text="@string/App_Secret"
android:textStyle="bold" />
<!--<EditText
android:id="@+id/editTextQYWXAppSecret"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:autofillHints=""
android:inputType="textPassword"
android:text=""
tools:ignore="LabelFor" />-->
<com.idormy.sms.forwarder.view.ClearEditText
android:id="@+id/editTextQYWXAppSecret"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginStart="10dp"
android:background="@drawable/line_bg_white_only_bottom_d8"
app:showEye="true"
app:textColor="@color/tv_black_333333"
@ -138,6 +128,7 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
@ -192,7 +183,9 @@
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="@string/specified_member_tips" />
android:text="@string/specified_member_tips"
android:textSize="10sp"
tools:ignore="SmallSp" />
</LinearLayout>
<LinearLayout

@ -20,7 +20,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_name" />
android:text="@string/set_name"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextQYWXGroupRobotName"
@ -39,7 +40,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:checked="false"
android:checked="true"
android:ems="14"
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
@ -51,20 +52,25 @@
android:layout_marginRight="10dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/QYWXGroupRobotWebHook" />
android:orientation="horizontal">
<!--<EditText
android:id="@+id/editTextQYWXGroupRobotWebHook"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
android:inputType="text"
android:text=""
tools:ignore="LabelFor" />-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/QYWXGroupRobotWebHook"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@string/QYWXGroupRobotWebHookTips"
android:textSize="10sp"
tools:ignore="SmallSp" />
</LinearLayout>
<com.idormy.sms.forwarder.view.ClearEditText
android:id="@+id/editTextQYWXGroupRobotWebHook"

@ -444,6 +444,34 @@
</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/switch_rule_status"
android:textStyle="bold" />
<Switch
android:id="@+id/switch_rule_status"
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:layout_width="match_parent"
android:layout_height="match_parent"

@ -446,6 +446,34 @@
</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/switch_rule_status"
android:textStyle="bold" />
<Switch
android:id="@+id/switch_rule_status"
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:layout_width="match_parent"
android:layout_height="match_parent"

@ -449,6 +449,34 @@
</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/switch_rule_status"
android:textStyle="bold" />
<Switch
android:id="@+id/switch_rule_status"
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:layout_width="match_parent"
android:layout_height="match_parent"

@ -20,7 +20,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_name" />
android:text="@string/set_name"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextServerChanName"
@ -39,7 +40,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:checked="false"
android:checked="true"
android:ems="14"
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
@ -54,17 +55,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ServerChanSendKey" />
<!--<EditText
android:id="@+id/editTextServerChanSendKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
android:inputType="textPassword"
android:text=""
tools:ignore="LabelFor" />-->
android:text="@string/ServerChanSendKey"
android:textStyle="bold" />
<com.idormy.sms.forwarder.view.ClearEditText
android:id="@+id/editTextServerChanSendKey"

@ -19,7 +19,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_name" />
android:text="@string/set_name"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextSmsName"
@ -38,7 +39,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:checked="false"
android:checked="true"
android:ems="14"
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
@ -55,7 +56,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:text="@string/SmsSimSlot" />
android:text="@string/SmsSimSlot"
android:textStyle="bold" />
<RadioGroup
android:id="@+id/radioGroupSmsSimSlot"
@ -84,16 +86,31 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_marginRight="10dp"
android:orientation="vertical">
<TextView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/SmsMobiles" />
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/SmsMobiles"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@string/SmsMobilesTips"
android:textSize="10sp"
tools:ignore="SmallSp" />
</LinearLayout>
<EditText
android:id="@+id/editTextSmsMobiles"
@ -117,7 +134,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/OnlyNoNetwork" />
android:text="@string/OnlyNoNetwork"
android:textStyle="bold" />
<Switch
android:id="@+id/switchSmsOnlyNoNetwork"

@ -29,7 +29,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:autofillHints=""
android:ems="11"
android:ems="10"
android:inputType="text"
android:text=""
tools:ignore="LabelFor" />
@ -40,7 +40,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:checked="false"
android:checked="true"
android:ems="14"
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
@ -58,16 +58,6 @@
android:text="@string/TelegramApiToken"
android:textStyle="bold" />
<!--<EditText
android:id="@+id/editTextTelegramApiToken"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
android:inputType="textPassword"
android:text=""
tools:ignore="LabelFor" />-->
<com.idormy.sms.forwarder.view.ClearEditText
android:id="@+id/editTextTelegramApiToken"
android:layout_width="wrap_content"
@ -85,6 +75,7 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
@ -123,6 +114,7 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:orientation="vertical">
<TextView
@ -133,7 +125,7 @@
<EditText
android:id="@+id/editTextTelegramChatId"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
@ -287,17 +279,6 @@
android:layout_height="wrap_content"
android:text="@string/password" />
<!--<EditText
android:id="@+id/editTextProxyPassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:autofillHints=""
android:ems="7"
android:inputType="textPassword"
android:text=""
tools:ignore="LabelFor,TextFields" />-->
<com.idormy.sms.forwarder.view.ClearEditText
android:id="@+id/editTextProxyPassword"
android:layout_width="wrap_content"

@ -20,7 +20,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_name" />
android:text="@string/set_name"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextWebNotifyName"
@ -38,9 +39,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:checked="false"
android:checked="true"
android:ems="14"
android:gravity="end"
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
@ -55,7 +56,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:text="@string/Method" />
android:text="@string/Method"
android:textStyle="bold" />
<RadioGroup
android:id="@+id/radioGroupWebNotifyMethod"
@ -88,14 +90,29 @@
android:layout_marginRight="10dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/WebNotifyWebServer" />
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/WebNotifyWebServer"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@string/WebNotifyWebServerTips"
android:textSize="10sp"
tools:ignore="SmallSp" />
</LinearLayout>
<EditText
android:id="@+id/editTextWebNotifyWebServer"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
@ -114,11 +131,19 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@string/WebNotifyWebParams' />
android:text='@string/WebNotifyWebParams'
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/WebNotifyWebParamsTips"
android:textSize="10sp"
tools:ignore="SmallSp" />
<EditText
android:id="@+id/editTextWebNotifyWebParams"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
@ -137,17 +162,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/WebNotifySecret" />
<!--<EditText
android:id="@+id/editTextWebNotifySecret"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autofillHints=""
android:ems="14"
android:inputType="textPassword"
android:text=""
tools:ignore="LabelFor" />-->
android:text="@string/WebNotifySecret"
android:textStyle="bold" />
<com.idormy.sms.forwarder.view.ClearEditText
android:id="@+id/editTextWebNotifySecret"

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/ItemImageView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center" />
<TextView
android:id="@+id/ItemTextView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:gravity="center"
android:maxEms="6"
android:maxLines="1"
android:textColor="#ffffff"
android:textSize="12sp" />
</LinearLayout>

@ -2,15 +2,33 @@
<LinearLayout 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">
android:layout_height="match_parent"
tools:ignore="UseCompoundDrawables"
android:background="@android:color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="5dp">
<ImageView
android:id="@+id/rule_sender_image"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_margin="5dp"
android:layout_gravity="center_vertical"
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="34dp"
android:layout_height="34dp"
android:layout_marginStart="5dp"
android:orientation="vertical">
<ImageView
android:id="@+id/rule_sender_image"
android:layout_width="32dp"
android:layout_height="32dp"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/rule_sender_status"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="18dp"
android:layout_marginTop="-14dp"
tools:ignore="ContentDescription" />
</LinearLayout>
<TextView
android:id="@+id/rule_match"

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="add_sender_menu">
<item>DingTalk Bot</item>
<item>Email</item>
<item>Bark</item>
<item>Webhook</item>
<item>WeCom Group Bot</item>
<item>WeCom</item>
<item>ServerChan·Turbo</item>
<item>Telegram Bot</item>
<item>SMS</item>
<item>FeiShu Bot</item>
<item>PushPlus</item>
<item>Gotify</item>
</string-array>
</resources>

@ -94,7 +94,7 @@
<string name="setemailtitle">Email Settings</string>
<string name="setwebnotifytitle">Webhook Settings</string>
<string name="setqywxgrouprobottitle">WeCom Group Bot Settings</string>
<string name="setqywxapptitle">WeCom Settings</string>
<string name="setqywxapptitle">WeCom App Settings</string>
<string name="setbarktitle">Bark Settings</string>
<string name="setserverchantitle">ServerChan·Turbo Settings</string>
<string name="settelegramtitle">Telegram Bot Settings</string>
@ -107,23 +107,31 @@
<string name="test_sms">【JD】code 387481, ihelp.jd.com</string>
<string name="test_group_name">Test Group Name</string>
<string name="failed_to_fwd">Failed to fwd</string>
<string name="invalid_token">Token cannot be blank</string>
<string name="invalid_name">Sender name cannot be blank</string>
<string name="invalid_token">Token is invalid</string>
<string name="invalid_email">Invalid email settings</string>
<string name="invalid_bark_server">Bark-server cannot be blank</string>
<string name="invalid_bark_server">Bark-server cannot be blank or not a valid url</string>
<string name="invalid_apiToken_or_chatId">Neither ApiToken nor ChatId can be blank</string>
<string name="invalid_host_or_port">The proxy is enabled. The host name and port number cannot be blank</string>
<string name="invalid_username_or_password">Authentication is enabled. The user and password cannot be empty at the same time</string>
<string name="invalid_sendkey">SendKey cannot be blank</string>
<string name="invalid_webserver">WebServer cannot be blank</string>
<string name="invalid_webhook">Webhook cannot be blank</string>
<string name="invalid_at_mobiles">The specified member cannot be blank or select @all</string> <!-- “指定成员 不能为空 或者 选择@all” 这句话是什么意思?“指定成员既不能为‘空’也不能为‘选择@all”吗还是“指定成员不能为空或者可以@all”呢 -->
<string name="invalid_at_mobiles">The specified member cannot be blank or select @all</string>
<string name="invalid_webcom_app_parm">CronID, AgentID and Secret cannot be blank</string>
<string name="invalid_phone_num">Phone number cannot be blank</string>
<string name="new_sender">New Sender</string>
<string name="set_bark_name">Bark Group Name/Status</string>
<string name="set_bark_server">Bark-Server, e.g. https://bark.bms.ink/XXXXXXXX/</string>
<string name="set_bark_icon">Bark-Icon (optional), e.g. http://day.app/assets/images/avatar.jpg</string>
<string name="set_bark_server">Bark-Server</string>
<string name="set_bark_server_tips"> e.g. https://day.app/XXXXXXXX/</string>
<string name="set_bark_icon">Bark-Icon (optional)</string>
<string name="set_bark_icon_tips">e.g. http://day.app/assets/images/avatar.jpg</string>
<string name="set_name">Name/Staus</string>
<string name="dingding_token">Token e.g. the XXXXXX part of https://oapi.dingtalk.com/robot/send?access_token=XXXXXX</string>
<string name="dingding_token">TokenNot contain links</string>
<string name="dingding_token_tips">e.g. the XXX part of https://oapi.dingtalk.com/robot/send?access_token=XXX</string>
<string name="dingding_secret">Secret (optional)</string>
<string name="dingding_at">At Mobiles e.g. 18888888888,19999999999</string>
<string name="dingding_at">At Mobiles</string>
<string name="dingding_at_tips">e.g. 18888888888,19999999999</string>
<string name="email_protocol">Protocol</string>
<string name="email_smtp">SMTP</string>
<string name="email_imap">IMAP </string>
@ -145,17 +153,21 @@
<string name="specified_member">Specified Member</string>
<string name="at_all">\@all</string>
<string name="specified_member_tips">TipSpecify members receive messages, member ID list (multiple recipients with \'|\' space, maximum 1000)</string>
<string name="QYWXGroupRobotWebHook">WebHook, e.g. https://qyapi.weixin.qq.com/cgixx?key=xxx</string>
<string name="QYWXGroupRobotWebHook">WebHook</string>
<string name="QYWXGroupRobotWebHookTips">e.g. https://qyapi.weixin.qq.com/cgixx?key=xxx</string>
<string name="ServerChanSendKey">ServerChan\'s SendKey</string>
<string name="TelegramApiToken">ApiToken or Custom address</string>
<string name="TelegramChatId">ChatId</string>
<string name="Method">Method</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="WebNotifyWebServer">WebServer</string>
<string name="WebNotifyWebServerTips">e.g. https://a.b.com/msg?token=xyz</string>
<string name="WebNotifyWebParams">WebParams</string>
<string name="WebNotifyWebParamsTips">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 (sign is not counted if left blank)</string>
<string name="SmsSimSlot">SIM Slot</string>
<string name="same_source">Same source</string>
<string name="SmsMobiles">Receive mobile phone numbers separated by, e.g. 15888888888;19999999999</string>
<string name="SmsMobiles">Receive mobile phone numbers</string>
<string name="SmsMobilesTips">Separated by, e.g. 15888888888;19999999999</string>
<string name="OnlyNoNetwork">Enable when no network is available</string>
<!--SettingActivity-->
<string name="device_name">Device name</string>
@ -242,6 +254,7 @@
<string name="notification_listener_service_enabled">The notification service is enabled</string>
<string name="notification_listener_service_disabled">The notification service is disabled</string>
<string name="pushplus_token">Token</string>
<string name="pushplus_token_tips">Tips: Go to https://www.pushplus.plus</string>
<string name="pushplus_topic">Topic</string>
<string name="pushplus_template">Template</string>
<string name="html">html</string>
@ -252,7 +265,7 @@
<string name="wechat">wechat</string>
<string name="account">✱Account</string>
<string name="servers">✱Servers</string>
<string name="email">✱Email</string>
<string name="email_settings">✱Email</string>
<string name="below">below</string>
<string name="percent">%</string>
<string name="above">above</string>
@ -274,10 +287,24 @@
<string name="agree">Agree</string>
<string name="disagree">Disagree</string>
<string name="privacy_policy_text">SmsForwarder (the "Application/App"), is 100\% free and open source, and is compliled and released basing on repository hosted on GitHub. The App will not collect any of your privacy data!\n\n Version information of the App will be sent in the following situations: \n 1. As startup, version information will be sent to "Umeng +· U-APP Mobile Statistics" for user retention analyze and crash stats;\n 2. Manual update check triggered by user;\n The App collects no any other data!!\n\n The App collects and uses version information only in accordance with the Privacy Policy, and will not collect any other information as an abuse of users\' consent to the Privacy Policy;</string>
<string name="GotifyWebServer"><![CDATA[Setting the WebServer, eg.: https://push.example.de/message?token=<apptoken>]]></string>
<string name="GotifyWebServer">Setting the WebServer</string>
<string name="GotifyWebServerTips"><![CDATA[eg.: https://push.ppps.cn/message?token=<apptoken>]]></string>
<string name="title_template">Title Template</string>
<string name="priority">Priority1 9</string>
<string name="_5">5</string>
<string name="enter_webserver_tips">Please enter the WebServer</string>
<string name="is_enable">Is Enable</string>
<string name="switch_rule_status">Enable this rule</string>
<string name="dingding">Dingtalk Bot</string>
<string name="email">Email</string>
<string name="bark">Bark</string>
<string name="webhook">Webhook</string>
<string name="qywx">WeCom Group Bot</string>
<string name="qywxapp">WeCom App</string>
<string name="serverchan">ServerChan·Turbo</string>
<string name="telegram">Telegram Bot</string>
<string name="sms_menu">SMS</string>
<string name="feishu">FeiShu Bot</string>
<string name="pushplus">PushPlus</string>
<string name="gotify">Gotify</string>
<string name="add">Add</string>
</resources>

@ -71,4 +71,9 @@
<enum name="textPassword" value="2" />
</attr>
</declare-styleable>
<style name="dialog_menu" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="add_sender_menu">
<item>钉钉机器人</item>
<item>邮箱</item>
<item>Bark</item>
<item>Webhook</item>
<item>企业微信群机器人</item>
<item>企业微信应用消息</item>
<item>Server酱·Turbo版</item>
<item>Telegram机器人</item>
<item>其他手机短信</item>
<item>飞书机器人</item>
<item>PushPlus</item>
<item>Gotify</item>
</string-array>
</resources>

@ -107,23 +107,31 @@
<string name="test_sms">【京东】验证码为387481切勿将验证码告知他人请在页面中输入完成验证如有问题请点击 ihelp.jd.com 联系京东客服</string>
<string name="test_group_name">测试分组</string>
<string name="failed_to_fwd">发送失败:</string>
<string name="invalid_token">token 不能为空</string>
<string name="invalid_name">通道名称不能为空</string>
<string name="invalid_token">token不合法</string>
<string name="invalid_email">邮箱参数不完整</string>
<string name="invalid_bark_server">bark-server 不能为空</string>
<string name="invalid_bark_server">bark-server为空 或 不是有效URL</string>
<string name="invalid_apiToken_or_chatId">机器人的ApiToken 和 被通知人的ChatId 都不能为空</string>
<string name="invalid_host_or_port">已开启代理,主机名和端口号都不能为空</string>
<string name="invalid_username_or_password">已开启身份验证,用户和密码不能同时为空</string>
<string name="invalid_sendkey">Server酱·Turbo版的 SendKey 不能为空</string>
<string name="invalid_webserver">WebServer 不能为空</string>
<string name="invalid_webhook">webHook 不能为空</string>
<string name="invalid_webserver">WebServer为空 或 不是有效URL</string>
<string name="invalid_webhook">WebHook为空 或 不是有效URL</string>
<string name="invalid_at_mobiles">指定成员 不能为空 或者 选择@all</string>
<string name="invalid_webcom_app_parm">企业ID、AgentID、Secret都不能为空</string>
<string name="invalid_phone_num">接收手机号不能为空</string>
<string name="new_sender">添加发送通道</string>
<string name="set_bark_name">分组名称/状态</string>
<string name="set_bark_server">设置Bark-Server地址示例https://bark.bms.ink/XXXXXXXX/</string>
<string name="set_bark_icon">设置推送消息图标(可选)示例http://day.app/assets/images/avatar.jpg</string>
<string name="set_bark_server">设置Bark-Server地址</string>
<string name="set_bark_server_tips">示例https://day.app/XXXXXXXX/</string>
<string name="set_bark_icon">设置推送消息图标(可选)</string>
<string name="set_bark_icon_tips">示例http://day.app/assets/images/avatar.jpg</string>
<string name="set_name">名称/状态</string>
<string name="dingding_token">设置Token 例如 https://oapi.dingtalk.com/robot/send?access_token=XXXXXX 中的 XXXXXX</string>
<string name="dingding_token">Token不含链接</string>
<string name="dingding_token_tips">https://oapi.dingtalk.com/robot/send?access_token=XXX 中的 XXX</string>
<string name="dingding_secret">加签 Secret (没有可不填)</string>
<string name="dingding_at">转发时@某人 填写某人的手机号,多个用逗号分开 例如18888888888,19999999999</string>
<string name="dingding_at">转发时@某人</string>
<string name="dingding_at_tips">Tips多个手机号用逗号分开例如18888888888,19999999999</string>
<string name="email_protocol">协议类型</string>
<string name="email_smtp">SMTP</string>
<string name="email_imap">IMAP</string>
@ -144,18 +152,22 @@
<string name="is_at_all">是否@all</string>
<string name="specified_member">指定成员</string>
<string name="at_all">\@all</string>
<string name="specified_member_tips">Tip指定接收消息的成员成员ID列表多个接收者用|分隔最多支持1000个</string>
<string name="QYWXGroupRobotWebHook">设置WebHook地址:示例https://qyapi.weixin.qq.com/cgixx?key=xxx</string>
<string name="ServerChanSendKey">设置Server酱·Turbo版的SendKey</string>
<string name="TelegramApiToken">设置Telegram机器人的ApiToken 或 自定义地址(http开头)</string>
<string name="TelegramChatId">设置被通知人(或群组)的ChatId</string>
<string name="specified_member_tips">Tip指定接收消息的成员ID列表多个接收者用|分隔最多支持1000个</string>
<string name="QYWXGroupRobotWebHook">WebHook地址</string>
<string name="QYWXGroupRobotWebHookTips">示例https://qyapi.weixin.qq.com/cgixx?key=xxx</string>
<string name="ServerChanSendKey">Server酱·Turbo版的SendKey</string>
<string name="TelegramApiToken">Telegram机器人的ApiToken 或 自定义地址(http开头)</string>
<string name="TelegramChatId">被通知人(或群组)的ChatId</string>
<string name="Method">请求方式</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="WebNotifySecret">设置Secret:置空则不计算sign</string>
<string name="WebNotifyWebServer">WebServer</string>
<string name="WebNotifyWebServerTips">例如https://a.b.com/msg?token=xyz</string>
<string name="WebNotifyWebParams">WebParams</string>
<string name="WebNotifyWebParamsTips">例如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="SmsSimSlot">发送卡槽</string>
<string name="same_source">原进原出</string>
<string name="SmsMobiles">接收手机多个号码以半角分号分隔例如15888888888;19999999999</string>
<string name="SmsMobiles">接收手机</string>
<string name="SmsMobilesTips">多个号码以半角分号分隔例如15888888888;19999999999</string>
<string name="OnlyNoNetwork">仅当无网络时启用</string>
<!--SettingActivity-->
<string name="device_name">设备名称</string>
@ -241,6 +253,7 @@
<string name="notification_listener_service_enabled">通知服务已开启</string>
<string name="notification_listener_service_disabled">通知服务未开启</string>
<string name="pushplus_token">用户令牌</string>
<string name="pushplus_token_tips">提示:前往官网 https://www.pushplus.plus 获取</string>
<string name="pushplus_topic">群组编码</string>
<string name="pushplus_template">发送模板</string>
<string name="html">html</string>
@ -251,7 +264,7 @@
<string name="wechat">wechat</string>
<string name="account">✱帐户管理</string>
<string name="servers">✱服务器信息</string>
<string name="email">✱邮件设置</string>
<string name="email_settings">✱邮件设置</string>
<string name="below">低于</string>
<string name="percent">%</string>
<string name="above">高于</string>
@ -273,10 +286,24 @@
<string name="agree">同意</string>
<string name="disagree">不同意</string>
<string name="privacy_policy_text">SmsForwarder-短信转发器(下称本软件) 100% 免费开源Github 在线编译发版,绝不会收集您的任何隐私数据! \n\n以下情形会上报本软件版本信息 \n 1、启动本软件时发送版本信息发送到《友盟+·U-App移动统计》用于分析本软件的用户版本留存与软件奔溃统计 \n 2、手动检查更新时发送版本号用于检查新版本 \n除此之外没有任何数据 \n\n本软件会遵循《隐私政策》收集、使用版本信息但不会因为您同意了《隐私政策》而进行强制捆绑式的信息收集。</string>
<string name="GotifyWebServer"><![CDATA[设置WebServer例如https://push.example.de/message?token=<apptoken>]]></string>
<string name="GotifyWebServer">WebServer</string>
<string name="GotifyWebServerTips"><![CDATA[例https://push.ppps.cn/message?token=<apptoken>]]></string>
<string name="title_template">标题模板</string>
<string name="priority">优先级1 - 9</string>
<string name="_5">5</string>
<string name="enter_webserver_tips">请输入WebServer</string>
<string name="is_enable">是否启用</string>
<string name="switch_rule_status">启用该条转发规则</string>
<string name="dingding">钉钉机器人</string>
<string name="email">电子邮箱</string>
<string name="bark">Bark</string>
<string name="webhook">Webhook</string>
<string name="qywx">企微群机器人</string>
<string name="qywxapp">企微应用消息</string>
<string name="serverchan">Server酱·Turbo版</string>
<string name="telegram">Telegram机器人</string>
<string name="sms_menu">手机短信</string>
<string name="feishu">飞书机器人</string>
<string name="pushplus">PushPlus</string>
<string name="gotify">Gotify</string>
<string name="add">添加</string>
</resources>

@ -74,4 +74,9 @@
<enum name="textPassword" value="2" />
</attr>
</declare-styleable>
<style name="dialog_menu" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Loading…
Cancel
Save