mirror of
https://github.com/pppscn/SmsForwarder
synced 2024-11-17 21:25:31 +00:00
修复bark-server升级到2.0后的兼容性问题
This commit is contained in:
parent
6d89e25d38
commit
fc42c5eec6
@ -14,8 +14,8 @@ android {
|
||||
applicationId "com.idormy.sms.forwarder"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 28
|
||||
versionCode 6
|
||||
versionName "1.2.0"
|
||||
versionCode 7
|
||||
versionName "1.2.1"
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
}
|
||||
buildTypes {
|
||||
|
BIN
app/release/SmsForwarder_release_20210226_1.2.1.apk
Normal file
BIN
app/release/SmsForwarder_release_20210226_1.2.1.apk
Normal file
Binary file not shown.
@ -10,9 +10,9 @@
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 6,
|
||||
"versionName": "1.2.0",
|
||||
"outputFile": "SmsForwarder_release_20210219_1.2.0.apk"
|
||||
"versionCode": 7,
|
||||
"versionName": "1.2.1",
|
||||
"outputFile": "SmsForwarder_release_20210226_1.2.1.apk"
|
||||
}
|
||||
]
|
||||
}
|
@ -6,8 +6,6 @@ import android.util.Log;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@ -31,7 +29,6 @@ public class SenderBarkMsg {
|
||||
}
|
||||
|
||||
barkServer += URLEncoder.encode(from, "UTF-8");
|
||||
String body = "短信内容:" + content + "\n转发时间:" + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
|
||||
barkServer += "/" + URLEncoder.encode(content, "UTF-8");
|
||||
barkServer += "?isArchive=1"; //自动保存
|
||||
int isCode = content.indexOf("验证码");
|
||||
@ -46,11 +43,7 @@ public class SenderBarkMsg {
|
||||
}
|
||||
|
||||
OkHttpClient client = new OkHttpClient();
|
||||
final Request request = new Request.Builder()
|
||||
.url(barkServer)
|
||||
.addHeader("Content-Type", "application/json; charset=utf-8")
|
||||
.get()
|
||||
.build();
|
||||
final Request request = new Request.Builder().url(barkServer).get().build();
|
||||
Call call = client.newCall(request);
|
||||
call.enqueue(new Callback() {
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user