This commit is contained in:
pppscn 2021-07-15 17:06:17 +08:00
parent 9c65c0e01d
commit e98118d993
10 changed files with 26 additions and 32 deletions

View File

@ -211,6 +211,7 @@
+ [v1.7.1](app/release/SmsForwarder_release_20210321_1.7.1.apk) 新增转发记录的转发状态(成功/失败&应答信息) + [v1.7.1](app/release/SmsForwarder_release_20210321_1.7.1.apk) 新增转发记录的转发状态(成功/失败&应答信息)
+ [v1.7.2](app/release/SmsForwarder_release_20210325_1.7.2.apk) 新增V1版证书签名避免部分低版本系统(Android 6.x)无证书错误 & 发送方邮箱允许自定义发件人昵称 + [v1.7.2](app/release/SmsForwarder_release_20210325_1.7.2.apk) 新增V1版证书签名避免部分低版本系统(Android 6.x)无证书错误 & 发送方邮箱允许自定义发件人昵称
+ [v1.7.3](app/release/SmsForwarder_release_20210331_1.7.3.apk) 修复“设置匹配模式”默认选择BUG & 转发到webhook时返回http状态200即为成功 & 转发到其他手机短信支持长短信合并 + [v1.7.3](app/release/SmsForwarder_release_20210331_1.7.3.apk) 修复“设置匹配模式”默认选择BUG & 转发到webhook时返回http状态200即为成功 & 转发到其他手机短信支持长短信合并
+ [v1.7.4](app/release/SmsForwarder_release_20210715_1.7.4.apk) 修复转发企业微信群机器人碰到"被截断问题 & 转发到webhook时忽略ssl证书校验提高自建服务端兼容性 & 转发telegram时将 # 替换为 井,避免被当作标签 & 隐私保护,发送方设置中敏感信息(密码/token/secret等)用星号显示 & 更新友盟基础组件库 & 解决“设置页面关闭卡槽信息,同时使用默认模板时,发送消息卡槽信息仍显示”
-------- --------

Binary file not shown.

View File

@ -5,14 +5,14 @@
"kind": "Directory" "kind": "Directory"
}, },
"applicationId": "com.idormy.sms.forwarder", "applicationId": "com.idormy.sms.forwarder",
"variantName": "processReleaseResources", "variantName": "release",
"elements": [ "elements": [
{ {
"type": "SINGLE", "type": "SINGLE",
"filters": [], "filters": [],
"versionCode": 24, "versionCode": 25,
"versionName": "1.7.3", "versionName": "1.7.4",
"outputFile": "SmsForwarder_release_20210331_1.7.3.apk" "outputFile": "SmsForwarder_release_20210715_1.7.4.apk"
} }
] ]
} }

View File

@ -1,19 +0,0 @@
[
{
"outputType": {
"type": "APK"
},
"apkInfo": {
"type": "MAIN",
"splits": [],
"versionCode": 1,
"versionName": "1.0.0",
"enabled": true,
"outputFile": "SmsForwarder_release_20210210_1.0.0.apk",
"fullName": "release",
"baseName": "release"
},
"path": "SmsForwarder_release_20210210_1.0.0.apk",
"properties": {}
}
]

View File

@ -2,7 +2,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.idormy.sms.forwarder"> package="com.idormy.sms.forwarder">
<uses-permission
android:name="android.permission.BATTERY_STATS"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<!-- 授予应用程序访问系统开机事件的权限 --> <!-- 授予应用程序访问系统开机事件的权限 -->

View File

@ -21,6 +21,8 @@ import java.util.Objects;
public class SmsForwarderBroadcastReceiver extends BroadcastReceiver { public class SmsForwarderBroadcastReceiver extends BroadcastReceiver {
private String TAG = "SmsForwarderBroadcastReceiver"; private String TAG = "SmsForwarderBroadcastReceiver";
private int intLevel;
private int intScale;
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
@ -89,6 +91,13 @@ public class SmsForwarderBroadcastReceiver extends BroadcastReceiver {
Log.e(TAG, "解析短信失败:" + throwable.getMessage()); Log.e(TAG, "解析短信失败:" + throwable.getMessage());
} }
} else if (intent.ACTION_BATTERY_CHANGED.equals(receiveAction)) {
//获得当前电量
intLevel = intent.getIntExtra("level", 0);
//获得手机总电量
intScale = intent.getIntExtra("scale", 100);
int percent = intLevel * 100 / intScale;
Log.d(TAG, "当前电量:" + percent + "%");
} }
} }

View File

@ -13,6 +13,9 @@ public class LogVo {
private int forwardStatus; private int forwardStatus;
private String forwardResponse; private String forwardResponse;
public LogVo() {
}
public LogVo(Long id, String from, String content, String simInfo, String time, String rule, int senderImageId, int forwardStatus, String forwardResponse) { public LogVo(Long id, String from, String content, String simInfo, String time, String rule, int senderImageId, int forwardStatus, String forwardResponse) {
this.id = id; this.id = id;
this.from = from; this.from = from;
@ -25,10 +28,6 @@ public class LogVo {
this.forwardResponse = forwardResponse; this.forwardResponse = forwardResponse;
} }
public LogVo() {
}
public Long getId() { public Long getId() {
return id; return id;
} }

View File

@ -540,11 +540,12 @@ public class PhoneUtils {
boolean permission_send_sms = (PackageManager.PERMISSION_GRANTED == pm.checkPermission("android.permission.SEND_SMS", that.getPackageName())); boolean permission_send_sms = (PackageManager.PERMISSION_GRANTED == pm.checkPermission("android.permission.SEND_SMS", that.getPackageName()));
boolean permission_read_phone_state = (PackageManager.PERMISSION_GRANTED == pm.checkPermission("android.permission.READ_PHONE_STATE", that.getPackageName())); boolean permission_read_phone_state = (PackageManager.PERMISSION_GRANTED == pm.checkPermission("android.permission.READ_PHONE_STATE", that.getPackageName()));
boolean permission_read_phone_numbers = (PackageManager.PERMISSION_GRANTED == pm.checkPermission("android.permission.READ_PHONE_NUMBERS", that.getPackageName())); boolean permission_read_phone_numbers = (PackageManager.PERMISSION_GRANTED == pm.checkPermission("android.permission.READ_PHONE_NUMBERS", that.getPackageName()));
boolean permission_battery_stats = (PackageManager.PERMISSION_GRANTED == pm.checkPermission("android.permission.BATTERY_STATS", that.getPackageName()));
if (!(permission_internet && permission_receive_boot && permission_foreground_service && if (!(permission_internet && permission_receive_boot && permission_foreground_service &&
permission_read_external_storage && permission_write_external_storage && permission_read_external_storage && permission_write_external_storage &&
permission_receive_sms && permission_read_sms && permission_send_sms && permission_receive_sms && permission_read_sms && permission_send_sms &&
permission_read_phone_state && permission_read_phone_numbers)) { permission_read_phone_state && permission_read_phone_numbers && permission_battery_stats)) {
ActivityCompat.requestPermissions((Activity) that, new String[]{ ActivityCompat.requestPermissions((Activity) that, new String[]{
Manifest.permission.INTERNET, Manifest.permission.INTERNET,
Manifest.permission.RECEIVE_BOOT_COMPLETED, Manifest.permission.RECEIVE_BOOT_COMPLETED,
@ -556,6 +557,7 @@ public class PhoneUtils {
Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_PHONE_STATE,
Manifest.permission.READ_PHONE_NUMBERS, Manifest.permission.READ_PHONE_NUMBERS,
Manifest.permission.FOREGROUND_SERVICE, Manifest.permission.FOREGROUND_SERVICE,
Manifest.permission.BATTERY_STATS,
}, 0x01); }, 0x01);
} }
} }

View File

@ -1,4 +1,4 @@
ext { ext {
appVersionCode = 24 appVersionCode = 25
appVersionName = "1.7.3" appVersionName = "1.7.4"
} }

View File

@ -10,7 +10,7 @@ buildscript {
maven { url "https://jitpack.io" } maven { url "https://jitpack.io" }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.2.1' classpath 'com.android.tools.build:gradle:4.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.chenenyu:img-optimizer:1.2.0' // classpath 'com.chenenyu:img-optimizer:1.2.0' //
} }