新增转发记录的转发状态(成功/失败&应答信息)

This commit is contained in:
pppscn 2021-03-21 21:57:46 +08:00
parent 3966cdfae2
commit d1e187bc74
26 changed files with 228 additions and 61 deletions

View File

@ -208,6 +208,7 @@
+ [v1.6.3](app/release/SmsForwarder_release_20210313_1.6.3.apk) 转发到webhook支持GET方式节点改变原配置要重新编辑兼容Android5.0待验证仅minSdkVersion改为21修复钉钉机器人没启用加签时url拼接错误问题
+ [v1.6.4](app/release/SmsForwarder_release_20210313_1.6.4.apk) Android8.1以下手机重启后尝试启动主界面,以便动态获取权限(修复开机自启后无法转发短信,要打开软件后才会转发短信的问题)
+ [v1.7.0](app/release/SmsForwarder_release_20210318_1.7.0.apk) 新增转发到其他手机短信 & 避免热插卡时FC & 规则展示优化 & 获取多卡信息&获取卡槽备注优化 & 新增恢复初始化配置
+ [v1.7.1](app/release/SmsForwarder_release_20210321_1.7.1.apk) 新增转发记录的转发状态(成功/失败&应答信息)
--------

Binary file not shown.

View File

@ -10,9 +10,9 @@
{
"type": "SINGLE",
"filters": [],
"versionCode": 21,
"versionName": "1.7.0",
"outputFile": "SmsForwarder_release_20210318_1.7.0.apk"
"versionCode": 22,
"versionName": "1.7.1",
"outputFile": "SmsForwarder_release_20210321_1.7.1.apk"
}
]
}

View File

@ -197,9 +197,9 @@ public class MainActivity extends AppCompatActivity implements ReFlashListView.I
builder.setTitle("详情");
String simInfo = logVo.getSimInfo();
if (simInfo != null) {
builder.setMessage(logVo.getFrom() + "\n\n" + logVo.getContent() + "\n\n" + logVo.getSimInfo() + "\n\n" + logVo.getRule() + "\n\n" + aUtil.utc2Local(logVo.getTime()));
builder.setMessage(logVo.getFrom() + "\n\n" + logVo.getContent() + "\n\n" + logVo.getSimInfo() + "\n\n" + logVo.getRule() + "\n\n" + aUtil.utc2Local(logVo.getTime()) + "\n\nResponse" + logVo.getForwardResponse());
} else {
builder.setMessage(logVo.getFrom() + "\n\n" + logVo.getContent() + "\n\n" + logVo.getRule() + "\n\n" + aUtil.utc2Local(logVo.getTime()));
builder.setMessage(logVo.getFrom() + "\n\n" + logVo.getContent() + "\n\n" + logVo.getRule() + "\n\n" + aUtil.utc2Local(logVo.getTime()) + "\n\nResponse" + logVo.getForwardResponse());
}
builder.show();
}

View File

@ -337,7 +337,7 @@ public class SenderActivity extends AppCompatActivity {
Boolean atAll = switchDingdingAtAll.isChecked();
if (token != null && !token.isEmpty()) {
try {
SenderDingdingMsg.sendMsg(handler, token, secret, atMobiles, atAll, "测试内容(content)@" + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())));
SenderDingdingMsg.sendMsg(0, handler, token, secret, atMobiles, atAll, "测试内容(content)@" + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())));
} catch (Exception e) {
Toast.makeText(SenderActivity.this, "发送失败:" + e.getMessage(), Toast.LENGTH_LONG).show();
e.printStackTrace();
@ -454,7 +454,7 @@ public class SenderActivity extends AppCompatActivity {
String toemail = editTextEmailToAdd.getText().toString();
if (!host.isEmpty() && !port.isEmpty() && !fromemail.isEmpty() && !pwd.isEmpty() && !toemail.isEmpty()) {
try {
SenderMailMsg.sendEmail(handler, host, port, ssl, fromemail, pwd, toemail, "SmsForwarder Title", "测试内容(content)@" + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())));
SenderMailMsg.sendEmail(0, handler, host, port, ssl, fromemail, pwd, toemail, "SmsForwarder Title", "测试内容(content)@" + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())));
} catch (Exception e) {
Toast.makeText(SenderActivity.this, "发送失败:" + e.getMessage(), Toast.LENGTH_LONG).show();
e.printStackTrace();
@ -544,7 +544,7 @@ public class SenderActivity extends AppCompatActivity {
String barkServer = editTextBarkServer.getText().toString();
if (!barkServer.isEmpty()) {
try {
SenderBarkMsg.sendMsg(handler, barkServer, "19999999999", "【京东】验证码为387481切勿将验证码告知他人请在页面中输入完成验证如有问题请点击 ihelp.jd.com 联系京东客服");
SenderBarkMsg.sendMsg(0, handler, barkServer, "19999999999", "【京东】验证码为387481切勿将验证码告知他人请在页面中输入完成验证如有问题请点击 ihelp.jd.com 联系京东客服");
} catch (Exception e) {
Toast.makeText(SenderActivity.this, "发送失败:" + e.getMessage(), Toast.LENGTH_LONG).show();
e.printStackTrace();
@ -635,7 +635,7 @@ public class SenderActivity extends AppCompatActivity {
String serverchanServer = editTextServerChanSendKey.getText().toString();
if (!serverchanServer.isEmpty()) {
try {
SenderServerChanMsg.sendMsg(handler, serverchanServer, "19999999999", "【京东】验证码为387481切勿将验证码告知他人请在页面中输入完成验证如有问题请点击 ihelp.jd.com 联系京东客服");
SenderServerChanMsg.sendMsg(0, handler, serverchanServer, "19999999999", "【京东】验证码为387481切勿将验证码告知他人请在页面中输入完成验证如有问题请点击 ihelp.jd.com 联系京东客服");
} catch (Exception e) {
Toast.makeText(SenderActivity.this, "发送失败:" + e.getMessage(), Toast.LENGTH_LONG).show();
e.printStackTrace();
@ -735,7 +735,7 @@ public class SenderActivity extends AppCompatActivity {
String method = radioGroupWebNotifyMethod.getCheckedRadioButtonId() == R.id.radioWebNotifyMethodGet ? "GET" : "POST";
if (!webServer.isEmpty()) {
try {
SenderWebNotifyMsg.sendMsg(handler, webServer, secret, method, "SmsForwarder Title", "测试内容(content)@" + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())));
SenderWebNotifyMsg.sendMsg(0, handler, webServer, secret, method, "SmsForwarder Title", "测试内容(content)@" + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())));
} catch (Exception e) {
Toast.makeText(SenderActivity.this, "发送失败:" + e.getMessage(), Toast.LENGTH_LONG).show();
e.printStackTrace();
@ -826,7 +826,7 @@ public class SenderActivity extends AppCompatActivity {
String webHook = editTextQYWXGroupRobotWebHook.getText().toString();
if (!webHook.isEmpty()) {
try {
SenderQyWxGroupRobotMsg.sendMsg(handler, webHook, "SmsForwarder Title", "测试内容(content)@" + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())));
SenderQyWxGroupRobotMsg.sendMsg(0, handler, webHook, "SmsForwarder Title", "测试内容(content)@" + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())));
} catch (Exception e) {
Toast.makeText(SenderActivity.this, "发送失败:" + e.getMessage(), Toast.LENGTH_LONG).show();
e.printStackTrace();
@ -957,7 +957,7 @@ public class SenderActivity extends AppCompatActivity {
//Boolean atAll = switchQYWXAppAtAll.isChecked();
if (toUser != null && !toUser.isEmpty()) {
try {
SenderQyWxAppMsg.sendMsg(handler, cropID, agentID, secret, toUser, "测试内容(content)@" + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())), true);
SenderQyWxAppMsg.sendMsg(0, handler, cropID, agentID, secret, toUser, "测试内容(content)@" + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())), true);
} catch (Exception e) {
Toast.makeText(SenderActivity.this, "发送失败:" + e.getMessage(), Toast.LENGTH_LONG).show();
e.printStackTrace();
@ -1055,7 +1055,7 @@ public class SenderActivity extends AppCompatActivity {
String chatId = editTextTelegramChatId.getText().toString();
if (!apiToken.isEmpty() && !chatId.isEmpty()) {
try {
SenderTelegramMsg.sendMsg(handler, apiToken, chatId, "19999999999", "【京东】验证码为387481切勿将验证码告知他人请在页面中输入完成验证如有问题请点击 ihelp.jd.com 联系京东客服");
SenderTelegramMsg.sendMsg(0, handler, apiToken, chatId, "19999999999", "【京东】验证码为387481切勿将验证码告知他人请在页面中输入完成验证如有问题请点击 ihelp.jd.com 联系京东客服");
} catch (Exception e) {
Toast.makeText(SenderActivity.this, "发送失败:" + e.getMessage(), Toast.LENGTH_LONG).show();
e.printStackTrace();
@ -1160,7 +1160,7 @@ public class SenderActivity extends AppCompatActivity {
Boolean onlyNoNetwork = switchSmsOnlyNoNetwork.isChecked();
if (!mobiles.isEmpty() && !mobiles.isEmpty()) {
try {
SenderSmsMsg.sendMsg(handler, simSlot, mobiles, onlyNoNetwork, "19999999999", "【京东】验证码为387481切勿将验证码告知他人请在页面中输入完成验证如有问题请点击 ihelp.jd.com 联系京东客服");
SenderSmsMsg.sendMsg(0, handler, simSlot, mobiles, onlyNoNetwork, "19999999999", "【京东】验证码为387481切勿将验证码告知他人请在页面中输入完成验证如有问题请点击 ihelp.jd.com 联系京东客服");
} catch (Exception e) {
Toast.makeText(SenderActivity.this, "发送失败:" + e.getMessage(), Toast.LENGTH_LONG).show();
e.printStackTrace();

View File

@ -1,6 +1,7 @@
package com.idormy.sms.forwarder.adapter;
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -60,6 +61,7 @@ public class LogAdapter extends ArrayAdapter<LogVo> {
viewHolder.tLogRule = view.findViewById(R.id.tlog_rule);
viewHolder.tLogTime = view.findViewById(R.id.tlog_time);
viewHolder.senderImage = view.findViewById(R.id.tlog_sender_image);
viewHolder.statusImage = view.findViewById(R.id.tlog_status_image);
viewHolder.simImage = view.findViewById(R.id.tlog_sim_image);
// 将ViewHolder存储在View中即将控件的实例存储在其中
@ -77,6 +79,7 @@ public class LogAdapter extends ArrayAdapter<LogVo> {
viewHolder.tLogTime.setText(aUtil.friendlyTime(logVo.getTime()));
viewHolder.senderImage.setImageResource(logVo.getSenderImageId());
viewHolder.simImage.setImageResource(logVo.getSimImageId());
viewHolder.statusImage.setImageResource(logVo.getStatusImageId());
}
return view;
@ -116,5 +119,6 @@ public class LogAdapter extends ArrayAdapter<LogVo> {
TextView tLogTime;
ImageView senderImage;
ImageView simImage;
ImageView statusImage;
}
}

View File

@ -16,5 +16,7 @@ public final class LogTable {
public static final String COLUMN_NAME_RULE_ID = "rule_id";
public static final String COLUMN_NAME_TIME = "time";
public static final String COLUMN_NAME_SIM_INFO = "sim_info";
public static final String COLUMN_NAME_FORWARD_STATUS = "forward_status";
public static final String COLUMN_NAME_FORWARD_RESPONSE = "forward_response";
}
}

View File

@ -10,8 +10,10 @@ public class LogVo {
private String rule;
private int senderImageId;
private String time;
private int forwardStatus;
private String forwardResponse;
public LogVo(Long id, String from, String content, String simInfo, String time, String rule, int senderImageId) {
public LogVo(Long id, String from, String content, String simInfo, String time, String rule, int senderImageId, int forwardStatus, String forwardResponse) {
this.id = id;
this.from = from;
this.content = content;
@ -19,6 +21,8 @@ public class LogVo {
this.time = time;
this.rule = rule;
this.senderImageId = senderImageId;
this.forwardStatus = forwardStatus;
this.forwardResponse = forwardResponse;
}
public LogVo() {
@ -65,6 +69,10 @@ public class LogVo {
return time;
}
public String getForwardResponse() {
return forwardResponse;
}
public int getSenderImageId() {
return senderImageId;
}
@ -81,4 +89,12 @@ public class LogVo {
return R.mipmap.sim1;
}
public int getStatusImageId() {
if (this.forwardStatus == 1) {
return R.drawable.ic_round_check;
}
return R.drawable.ic_round_cancel;
}
}

View File

@ -60,8 +60,8 @@ public class SendUtil {
List<SenderModel> senderModels = SenderUtil.getSender(ruleModel.getSenderId(), null);
for (SenderModel senderModel : senderModels
) {
LogUtil.addLog(new LogModel(smsVo.getMobile(), smsVo.getContent(), smsVo.getSimInfo(), ruleModel.getId()));
SendUtil.senderSendMsgNoHandError(smsVo, senderModel);
long logId = LogUtil.addLog(new LogModel(smsVo.getMobile(), smsVo.getContent(), smsVo.getSimInfo(), ruleModel.getId()));
SendUtil.senderSendMsgNoHandError(smsVo, senderModel, logId);
}
}
} catch (Exception e) {
@ -94,15 +94,15 @@ public class SendUtil {
for (SenderModel senderModel : senderModels
) {
SendUtil.senderSendMsg(handError, smsVo, senderModel);
SendUtil.senderSendMsg(handError, smsVo, senderModel, 0);
}
}
public static void senderSendMsgNoHandError(SmsVo smsVo, SenderModel senderModel) {
SendUtil.senderSendMsg(null, smsVo, senderModel);
public static void senderSendMsgNoHandError(SmsVo smsVo, SenderModel senderModel, long logId) {
SendUtil.senderSendMsg(null, smsVo, senderModel, logId);
}
public static void senderSendMsg(Handler handError, SmsVo smsVo, SenderModel senderModel) {
public static void senderSendMsg(Handler handError, SmsVo smsVo, SenderModel senderModel, long logId) {
Log.i(TAG, "senderSendMsg smsVo:" + smsVo + "senderModel:" + senderModel);
switch (senderModel.getType()) {
@ -112,8 +112,9 @@ public class SendUtil {
DingDingSettingVo dingDingSettingVo = JSON.parseObject(senderModel.getJsonSetting(), DingDingSettingVo.class);
if (dingDingSettingVo != null) {
try {
SenderDingdingMsg.sendMsg(handError, dingDingSettingVo.getToken(), dingDingSettingVo.getSecret(), dingDingSettingVo.getAtMobils(), dingDingSettingVo.getAtAll(), smsVo.getSmsVoForSend());
SenderDingdingMsg.sendMsg(logId, handError, dingDingSettingVo.getToken(), dingDingSettingVo.getSecret(), dingDingSettingVo.getAtMobils(), dingDingSettingVo.getAtAll(), smsVo.getSmsVoForSend());
} catch (Exception e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.e(TAG, "senderSendMsg: dingding error " + e.getMessage());
}
}
@ -126,9 +127,10 @@ public class SendUtil {
EmailSettingVo emailSettingVo = JSON.parseObject(senderModel.getJsonSetting(), EmailSettingVo.class);
if (emailSettingVo != null) {
try {
SenderMailMsg.sendEmail(handError, emailSettingVo.getHost(), emailSettingVo.getPort(), emailSettingVo.getSsl(), emailSettingVo.getFromEmail(),
SenderMailMsg.sendEmail(logId, handError, emailSettingVo.getHost(), emailSettingVo.getPort(), emailSettingVo.getSsl(), emailSettingVo.getFromEmail(),
emailSettingVo.getPwd(), emailSettingVo.getToEmail(), smsVo.getMobile(), smsVo.getSmsVoForSend());
} catch (Exception e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.e(TAG, "senderSendMsg: SenderMailMsg error " + e.getMessage());
}
}
@ -141,8 +143,9 @@ public class SendUtil {
BarkSettingVo barkSettingVo = JSON.parseObject(senderModel.getJsonSetting(), BarkSettingVo.class);
if (barkSettingVo != null) {
try {
SenderBarkMsg.sendMsg(handError, barkSettingVo.getServer(), smsVo.getMobile(), smsVo.getSmsVoForSend());
SenderBarkMsg.sendMsg(logId, handError, barkSettingVo.getServer(), smsVo.getMobile(), smsVo.getSmsVoForSend());
} catch (Exception e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.e(TAG, "senderSendMsg: SenderBarkMsg error " + e.getMessage());
}
}
@ -155,8 +158,9 @@ public class SendUtil {
WebNotifySettingVo webNotifySettingVo = JSON.parseObject(senderModel.getJsonSetting(), WebNotifySettingVo.class);
if (webNotifySettingVo != null) {
try {
SenderWebNotifyMsg.sendMsg(handError, webNotifySettingVo.getWebServer(), webNotifySettingVo.getSecret(), webNotifySettingVo.getMethod(), smsVo.getMobile(), smsVo.getSmsVoForSend());
SenderWebNotifyMsg.sendMsg(logId, handError, webNotifySettingVo.getWebServer(), webNotifySettingVo.getSecret(), webNotifySettingVo.getMethod(), smsVo.getMobile(), smsVo.getSmsVoForSend());
} catch (Exception e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.e(TAG, "senderSendMsg: SenderWebNotifyMsg error " + e.getMessage());
}
}
@ -169,8 +173,9 @@ public class SendUtil {
QYWXGroupRobotSettingVo qywxGroupRobotSettingVo = JSON.parseObject(senderModel.getJsonSetting(), QYWXGroupRobotSettingVo.class);
if (qywxGroupRobotSettingVo != null) {
try {
SenderQyWxGroupRobotMsg.sendMsg(handError, qywxGroupRobotSettingVo.getWebHook(), smsVo.getMobile(), smsVo.getSmsVoForSend());
SenderQyWxGroupRobotMsg.sendMsg(logId, handError, qywxGroupRobotSettingVo.getWebHook(), smsVo.getMobile(), smsVo.getSmsVoForSend());
} catch (Exception e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.e(TAG, "senderSendMsg: SenderQyWxGroupRobotMsg error " + e.getMessage());
}
}
@ -183,8 +188,9 @@ public class SendUtil {
QYWXAppSettingVo qYWXAppSettingVo = JSON.parseObject(senderModel.getJsonSetting(), QYWXAppSettingVo.class);
if (qYWXAppSettingVo != null) {
try {
SenderQyWxAppMsg.sendMsg(handError, qYWXAppSettingVo.getCorpID(), qYWXAppSettingVo.getAgentID(), qYWXAppSettingVo.getSecret(), qYWXAppSettingVo.getToUser(), smsVo.getSmsVoForSend(), false);
SenderQyWxAppMsg.sendMsg(logId, handError, qYWXAppSettingVo.getCorpID(), qYWXAppSettingVo.getAgentID(), qYWXAppSettingVo.getSecret(), qYWXAppSettingVo.getToUser(), smsVo.getSmsVoForSend(), false);
} catch (Exception e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.e(TAG, "senderSendMsg: qywx_app error " + e.getMessage());
}
}
@ -197,8 +203,9 @@ public class SendUtil {
ServerChanSettingVo serverChanSettingVo = JSON.parseObject(senderModel.getJsonSetting(), ServerChanSettingVo.class);
if (serverChanSettingVo != null) {
try {
SenderServerChanMsg.sendMsg(handError, serverChanSettingVo.getSendKey(), smsVo.getMobile(), smsVo.getSmsVoForSend());
SenderServerChanMsg.sendMsg(logId, handError, serverChanSettingVo.getSendKey(), smsVo.getMobile(), smsVo.getSmsVoForSend());
} catch (Exception e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.e(TAG, "senderSendMsg: SenderServerChanMsg error " + e.getMessage());
}
}
@ -211,8 +218,9 @@ public class SendUtil {
TelegramSettingVo telegramSettingVo = JSON.parseObject(senderModel.getJsonSetting(), TelegramSettingVo.class);
if (telegramSettingVo != null) {
try {
SenderTelegramMsg.sendMsg(handError, telegramSettingVo.getApiToken(), telegramSettingVo.getChatId(), smsVo.getMobile(), smsVo.getSmsVoForSend());
SenderTelegramMsg.sendMsg(logId, handError, telegramSettingVo.getApiToken(), telegramSettingVo.getChatId(), smsVo.getMobile(), smsVo.getSmsVoForSend());
} catch (Exception e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.e(TAG, "senderSendMsg: SenderTelegramMsg error " + e.getMessage());
}
}
@ -226,7 +234,9 @@ public class SendUtil {
if (smsSettingVo != null) {
//仅当无网络时启用
if (true == smsSettingVo.getOnlyNoNetwork() && 0 != NetUtil.getNetWorkStatus()) {
Log.d(TAG, "仅当无网络时启用,当前网络状态:" + NetUtil.getNetWorkStatus());
String msg = "仅当无网络时启用,当前网络状态:" + NetUtil.getNetWorkStatus();
LogUtil.updateLog(logId, 0, msg);
Log.d(TAG, msg);
return;
}
try {
@ -235,8 +245,9 @@ public class SendUtil {
simSlot = Integer.parseInt(smsVo.getSimInfo().substring(3, 4)) - 1;
Log.d(TAG, "simSlot = " + simSlot);
}
SenderSmsMsg.sendMsg(handError, simSlot, smsSettingVo.getMobiles(), smsSettingVo.getOnlyNoNetwork(), smsVo.getMobile(), smsVo.getSmsVoForSend());
SenderSmsMsg.sendMsg(logId, handError, simSlot, smsSettingVo.getMobiles(), smsSettingVo.getOnlyNoNetwork(), smsVo.getMobile(), smsVo.getSmsVoForSend());
} catch (Exception e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.e(TAG, "senderSendMsg: SenderSmsMsg error " + e.getMessage());
}
}

View File

@ -5,6 +5,8 @@ import android.os.Handler;
import android.os.Message;
import android.util.Log;
import com.idormy.sms.forwarder.utils.LogUtil;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.regex.Matcher;
@ -22,7 +24,7 @@ public class SenderBarkMsg {
static String TAG = "SenderBarkMsg";
public static void sendMsg(final Handler handError, String barkServer, String from, String content) throws Exception {
public static void sendMsg(final long logId, final Handler handError, String barkServer, String from, String content) throws Exception {
Log.i(TAG, "sendMsg barkServer:" + barkServer + " from:" + from + " content:" + content);
if (barkServer == null || barkServer.isEmpty()) {
@ -52,6 +54,7 @@ public class SenderBarkMsg {
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, final IOException e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.d(TAG, "onFailure" + e.getMessage());
if (handError != null) {
@ -70,6 +73,13 @@ public class SenderBarkMsg {
final String responseStr = response.body().string();
Log.d(TAG, "Code" + response.code() + responseStr);
//TODO:粗略解析是否发送成功
if (responseStr.contains("\"message\":\"success\"")) {
LogUtil.updateLog(logId, 1, responseStr);
} else {
LogUtil.updateLog(logId, 0, responseStr);
}
if (handError != null) {
Message msg = new Message();
msg.what = NOTIFY;

View File

@ -7,6 +7,7 @@ import android.util.Base64;
import android.util.Log;
import com.alibaba.fastjson.JSON;
import com.idormy.sms.forwarder.utils.LogUtil;
import java.io.IOException;
import java.net.URLEncoder;
@ -32,7 +33,7 @@ public class SenderDingdingMsg {
static String TAG = "SenderDingdingMsg";
public static void sendMsg(final Handler handError, String token, String secret, String atMobiles, Boolean atAll, String msg) throws Exception {
public static void sendMsg(final long logId, final Handler handError, String token, String secret, String atMobiles, Boolean atAll, String msg) throws Exception {
Log.i(TAG, "sendMsg token:" + token + " secret:" + secret + " atMobiles:" + atMobiles + " atAll:" + atAll + " msg:" + msg);
if (token == null || token.isEmpty()) {
@ -98,6 +99,7 @@ public class SenderDingdingMsg {
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, final IOException e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.d(TAG, "onFailure" + e.getMessage());
if (handError != null) {
@ -116,6 +118,13 @@ public class SenderDingdingMsg {
final String responseStr = response.body().string();
Log.d(TAG, "Code" + String.valueOf(response.code()) + responseStr);
//TODO:粗略解析是否发送成功
if (responseStr.contains("\"errcode\":0")) {
LogUtil.updateLog(logId, 1, responseStr);
} else {
LogUtil.updateLog(logId, 0, responseStr);
}
if (handError != null) {
android.os.Message msg = new android.os.Message();
msg.what = NOTIFY;

View File

@ -4,6 +4,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import com.idormy.sms.forwarder.utils.LogUtil;
import com.smailnet.emailkit.Draft;
import com.smailnet.emailkit.EmailKit;
@ -13,7 +14,7 @@ import static com.idormy.sms.forwarder.SenderActivity.NOTIFY;
public class SenderMailMsg {
private static String TAG = "SenderMailMsg";
public static void sendEmail(final Handler handError, final String host, final String port, final boolean ssl, final String fromemail, final String pwd, final String toAdd, final String title, final String content) {
public static void sendEmail(final long logId, final Handler handError, final String host, final String port, final boolean ssl, final String fromemail, final String pwd, final String toAdd, final String title, final String content) {
Log.d(TAG, "sendEmail: host:" + host + " port:" + port + " ssl:" + ssl + " fromemail:" + fromemail + " pwd:" + pwd + " toAdd:" + toAdd);
@ -39,7 +40,8 @@ public class SenderMailMsg {
.send(draft, new EmailKit.GetSendCallback() {
@Override
public void onSuccess() {
Log.i(TAG, "发送成功!");
LogUtil.updateLog(logId, 1, "发送成功");
Log.i(TAG, "发送成功");
if (handError != null) {
android.os.Message msg = new android.os.Message();
msg.what = NOTIFY;
@ -52,6 +54,7 @@ public class SenderMailMsg {
@Override
public void onFailure(String errMsg) {
LogUtil.updateLog(logId, 0, errMsg);
Log.i(TAG, "发送失败,错误:" + errMsg);
if (handError != null) {
android.os.Message msg = new android.os.Message();
@ -68,6 +71,7 @@ public class SenderMailMsg {
EmailKit.destroy();
} catch (Exception e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.e(TAG, e.getMessage(), e);
if (handError != null) {
android.os.Message msg = new android.os.Message();

View File

@ -8,6 +8,7 @@ import android.util.Log;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.idormy.sms.forwarder.MyApplication;
import com.idormy.sms.forwarder.utils.LogUtil;
import java.io.IOException;
import java.util.HashMap;
@ -27,7 +28,7 @@ public class SenderQyWxAppMsg {
static String TAG = "SenderQyWxAppMsg";
public static void sendMsg(final Handler handError, String corpID, String agentID, String secret, String toUser, String content, boolean forceRefresh) throws Exception {
public static void sendMsg(final long logId, final Handler handError, String corpID, String agentID, String secret, String toUser, String content, boolean forceRefresh) throws Exception {
Log.i(TAG, "sendMsg corpID:" + corpID + " agentID:" + agentID + " secret:" + secret + " toUser:" + toUser + " content:" + content + " forceRefresh:" + forceRefresh);
if (corpID == null || corpID.isEmpty() || agentID == null || agentID.isEmpty() || secret == null || secret.isEmpty()) {
@ -49,6 +50,7 @@ public class SenderQyWxAppMsg {
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, final IOException e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.d(TAG, "onFailure" + e.getMessage());
if (handError != null) {
Message msg = new Message();
@ -72,9 +74,10 @@ public class SenderQyWxAppMsg {
Log.d(TAG, "access_token" + MyApplication.QyWxAccessToken);
Log.d(TAG, "expires_in" + MyApplication.QyWxAccessTokenExpiresIn);
sendTextMsg(handError, agentID, toUser, content);
sendTextMsg(logId, handError, agentID, toUser, content);
} else {
String errmsg = jsonObject.getString("errmsg");
LogUtil.updateLog(logId, 0, errmsg);
Log.d(TAG, "onFailure" + errmsg);
if (handError != null) {
Message msg = new Message();
@ -89,13 +92,13 @@ public class SenderQyWxAppMsg {
});
} else {
sendTextMsg(handError, agentID, toUser, content);
sendTextMsg(logId, handError, agentID, toUser, content);
}
}
//发送文本消息
public static void sendTextMsg(final Handler handError, String agentID, String toUser, String content) {
public static void sendTextMsg(final long logId, final Handler handError, String agentID, String toUser, String content) {
String sendUrl = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=" + MyApplication.QyWxAccessToken;
Log.d(TAG, "sendUrl" + sendUrl);
@ -123,6 +126,7 @@ public class SenderQyWxAppMsg {
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, final IOException e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.d(TAG, "onFailure" + e.getMessage());
if (handError != null) {
android.os.Message msg = new android.os.Message();
@ -139,6 +143,13 @@ public class SenderQyWxAppMsg {
final String responseStr = response.body().string();
Log.d(TAG, "Code" + String.valueOf(response.code()) + " Response: " + responseStr);
//TODO:粗略解析是否发送成功
if (responseStr.contains("\"errcode\":0")) {
LogUtil.updateLog(logId, 1, responseStr);
} else {
LogUtil.updateLog(logId, 0, responseStr);
}
if (handError != null) {
android.os.Message msg = new android.os.Message();
msg.what = NOTIFY;

View File

@ -4,6 +4,8 @@ import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import com.idormy.sms.forwarder.utils.LogUtil;
import java.io.IOException;
import okhttp3.Call;
@ -20,7 +22,7 @@ public class SenderQyWxGroupRobotMsg {
static String TAG = "SenderQyWxGroupRobotMsg";
public static void sendMsg(final Handler handError, String webHook, String from, String content) throws Exception {
public static void sendMsg(final long logId, final Handler handError, String webHook, String from, String content) throws Exception {
Log.i(TAG, "sendMsg webHook:" + webHook + " from:" + from + " content:" + content);
if (webHook == null || webHook.isEmpty()) {
@ -41,10 +43,9 @@ public class SenderQyWxGroupRobotMsg {
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, final IOException e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.d(TAG, "onFailure" + e.getMessage());
// SendHistory.addHistory("钉钉转发:"+msgf+"onFailure" + e.getMessage());
if (handError != null) {
android.os.Message msg = new android.os.Message();
msg.what = NOTIFY;
@ -53,8 +54,6 @@ public class SenderQyWxGroupRobotMsg {
msg.setData(bundle);
handError.sendMessage(msg);
}
}
@Override
@ -62,6 +61,13 @@ public class SenderQyWxGroupRobotMsg {
final String responseStr = response.body().string();
Log.d(TAG, "Code" + String.valueOf(response.code()) + responseStr);
//TODO:粗略解析是否发送成功
if (responseStr.contains("\"errcode\":0")) {
LogUtil.updateLog(logId, 1, responseStr);
} else {
LogUtil.updateLog(logId, 0, responseStr);
}
if (handError != null) {
android.os.Message msg = new android.os.Message();
msg.what = NOTIFY;
@ -71,7 +77,6 @@ public class SenderQyWxGroupRobotMsg {
handError.sendMessage(msg);
Log.d(TAG, "Coxxyyde" + String.valueOf(response.code()) + responseStr);
}
}
});
}

View File

@ -5,6 +5,8 @@ import android.os.Handler;
import android.os.Message;
import android.util.Log;
import com.idormy.sms.forwarder.utils.LogUtil;
import java.io.IOException;
import okhttp3.Call;
@ -21,7 +23,7 @@ public class SenderServerChanMsg {
static String TAG = "SenderServerChanMsg";
public static void sendMsg(final Handler handError, String sendKey, String title, String desp) throws Exception {
public static void sendMsg(final long logId, final Handler handError, String sendKey, String title, String desp) throws Exception {
Log.i(TAG, "sendMsg sendKey:" + sendKey + " title:" + title + " desp:" + desp);
if (sendKey == null || sendKey.isEmpty()) {
@ -44,6 +46,7 @@ public class SenderServerChanMsg {
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, final IOException e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.d(TAG, "onFailure" + e.getMessage());
if (handError != null) {
@ -62,6 +65,13 @@ public class SenderServerChanMsg {
final String responseStr = response.body().string();
Log.d(TAG, "Code" + response.code() + responseStr);
//TODO:粗略解析是否发送成功
if (responseStr.contains("\"code\":0")) {
LogUtil.updateLog(logId, 1, responseStr);
} else {
LogUtil.updateLog(logId, 0, responseStr);
}
if (handError != null) {
Message msg = new Message();
msg.what = NOTIFY;

View File

@ -3,6 +3,7 @@ package com.idormy.sms.forwarder.sender;
import android.os.Handler;
import android.util.Log;
import com.idormy.sms.forwarder.utils.LogUtil;
import com.idormy.sms.forwarder.utils.SimUtil;
import com.idormy.sms.forwarder.utils.SmsUtil;
@ -10,12 +11,19 @@ public class SenderSmsMsg {
static String TAG = "SenderSmsMsg";
public static void sendMsg(final Handler handError, int simSlot, String mobiles, Boolean onlyNoNetwork, String from, String text) throws Exception {
public static void sendMsg(final long logId, final Handler handError, int simSlot, String mobiles, Boolean onlyNoNetwork, String from, String text) throws Exception {
Log.i(TAG, "sendMsg simSlot:" + simSlot + " mobiles:" + mobiles + " onlyNoNetwork:" + onlyNoNetwork + " from:" + from + " text:" + text);
//TODOsimSlot转subId
int subId = SimUtil.getSubscriptionIdBySimId(simSlot);
SmsUtil.sendSms(subId, mobiles, text);
String res = SmsUtil.sendSms(subId, mobiles, text);
//TODO:粗略解析是否发送成功
if (res == null) {
LogUtil.updateLog(logId, 1, "发送成功");
} else {
LogUtil.updateLog(logId, 0, res);
}
}
}

View File

@ -6,6 +6,7 @@ import android.os.Message;
import android.util.Log;
import com.alibaba.fastjson.JSON;
import com.idormy.sms.forwarder.utils.LogUtil;
import java.io.IOException;
import java.util.HashMap;
@ -25,7 +26,7 @@ public class SenderTelegramMsg {
static String TAG = "SenderTelegramMsg";
public static void sendMsg(final Handler handError, String apiToken, String chatId, String from, String text) throws Exception {
public static void sendMsg(final long logId, final Handler handError, String apiToken, String chatId, String from, String text) throws Exception {
Log.i(TAG, "sendMsg apiToken:" + apiToken + " chatId:" + chatId + " text:" + text);
if (apiToken == null || apiToken.isEmpty()) {
@ -57,6 +58,7 @@ public class SenderTelegramMsg {
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, final IOException e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.d(TAG, "onFailure" + e.getMessage());
if (handError != null) {
@ -75,6 +77,13 @@ public class SenderTelegramMsg {
final String responseStr = response.body().string();
Log.d(TAG, "Code" + response.code() + responseStr);
//TODO:粗略解析是否发送成功
if (responseStr.contains("\"ok\":true")) {
LogUtil.updateLog(logId, 1, responseStr);
} else {
LogUtil.updateLog(logId, 0, responseStr);
}
if (handError != null) {
Message msg = new Message();
msg.what = NOTIFY;

View File

@ -5,6 +5,8 @@ import android.os.Handler;
import android.util.Base64;
import android.util.Log;
import com.idormy.sms.forwarder.utils.LogUtil;
import java.io.IOException;
import java.net.URLEncoder;
@ -25,7 +27,7 @@ public class SenderWebNotifyMsg {
static String TAG = "SenderWebNotifyMsg";
public static void sendMsg(final Handler handError, String webServer, String secret, String method, String from, String content) throws Exception {
public static void sendMsg(final long logId, final Handler handError, String webServer, String secret, String method, String from, String content) throws Exception {
Log.i(TAG, "sendMsg webServer:" + webServer + " from:" + from + " content:" + content);
if (webServer == null || webServer.isEmpty()) {
@ -73,6 +75,7 @@ public class SenderWebNotifyMsg {
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, final IOException e) {
LogUtil.updateLog(logId, 0, e.getMessage());
Log.d(TAG, "onFailure" + e.getMessage());
if (handError != null) {
@ -91,6 +94,13 @@ public class SenderWebNotifyMsg {
final String responseStr = response.body().string();
Log.d(TAG, "Code" + response.code() + " Response" + responseStr);
//TODO:粗略解析是否发送成功
if (responseStr.contains("\"code\":1")) {
LogUtil.updateLog(logId, 1, responseStr);
} else {
LogUtil.updateLog(logId, 0, responseStr);
}
if (handError != null) {
android.os.Message msg = new android.os.Message();
msg.what = NOTIFY;

View File

@ -15,7 +15,7 @@ import java.util.List;
public class DbHelper extends SQLiteOpenHelper {
// If you change the database schema, you must increment the database version.
public static final String TAG = "DbHelper";
public static final int DATABASE_VERSION = 3;
public static final int DATABASE_VERSION = 4;
public static final String DATABASE_NAME = "sms_forwarder.db";
private static final List<String> SQL_CREATE_ENTRIES =
@ -26,6 +26,8 @@ public class DbHelper extends SQLiteOpenHelper {
LogTable.LogEntry.COLUMN_NAME_CONTENT + " TEXT," +
LogTable.LogEntry.COLUMN_NAME_SIM_INFO + " TEXT," +
LogTable.LogEntry.COLUMN_NAME_RULE_ID + " INTEGER," +
LogTable.LogEntry.COLUMN_NAME_FORWARD_STATUS + " INTEGER NOT NULL DEFAULT 1," +
LogTable.LogEntry.COLUMN_NAME_FORWARD_RESPONSE + " TEXT NOT NULL DEFAULT 'ok'," +
LogTable.LogEntry.COLUMN_NAME_TIME + " TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP)"
, "CREATE TABLE " + RuleTable.RuleEntry.TABLE_NAME + " (" +
RuleTable.RuleEntry._ID + " INTEGER PRIMARY KEY," +
@ -82,6 +84,12 @@ public class DbHelper extends SQLiteOpenHelper {
String sql = "Alter table " + RuleTable.RuleEntry.TABLE_NAME + " add column " + RuleTable.RuleEntry.COLUMN_NAME_SIM_SLOT + " TEXT NOT NULL DEFAULT 'ALL' ";
db.execSQL(sql);
}
if (oldVersion < 4) { //添加转发状态与返回信息
String sql = "Alter table " + LogTable.LogEntry.TABLE_NAME + " add column " + LogTable.LogEntry.COLUMN_NAME_FORWARD_STATUS + " INTEGER NOT NULL DEFAULT 1 ";
db.execSQL(sql);
sql = "Alter table " + LogTable.LogEntry.TABLE_NAME + " add column " + LogTable.LogEntry.COLUMN_NAME_FORWARD_RESPONSE + " TEXT NOT NULL DEFAULT 'ok' ";
db.execSQL(sql);
}
}
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {

View File

@ -82,6 +82,22 @@ public class LogUtil {
}
public static int updateLog(Long id, int forward_status, String forward_response) {
if (id == null || id <= 0) return 0;
String selection = LogTable.LogEntry._ID + " = ? ";
List<String> selectionArgList = new ArrayList<>();
selectionArgList.add(String.valueOf(id));
ContentValues values = new ContentValues();
values.put(LogTable.LogEntry.COLUMN_NAME_FORWARD_STATUS, forward_status);
values.put(LogTable.LogEntry.COLUMN_NAME_FORWARD_RESPONSE, forward_response);
String[] selectionArgs = selectionArgList.toArray(new String[selectionArgList.size()]);
return db.update(LogTable.LogEntry.TABLE_NAME, values, selection, selectionArgs);
}
public static List<LogVo> getLog(Long id, String key) {
// Define a projection that specifies which columns from the database
// you will actually use after this query.
@ -91,6 +107,8 @@ public class LogUtil {
LogTable.LogEntry.TABLE_NAME + "." + LogTable.LogEntry.COLUMN_NAME_TIME + " AS " + LogTable.LogEntry.COLUMN_NAME_TIME,
LogTable.LogEntry.TABLE_NAME + "." + LogTable.LogEntry.COLUMN_NAME_CONTENT + " AS " + LogTable.LogEntry.COLUMN_NAME_CONTENT,
LogTable.LogEntry.TABLE_NAME + "." + LogTable.LogEntry.COLUMN_NAME_SIM_INFO + " AS " + LogTable.LogEntry.COLUMN_NAME_SIM_INFO,
LogTable.LogEntry.TABLE_NAME + "." + LogTable.LogEntry.COLUMN_NAME_FORWARD_STATUS + " AS " + LogTable.LogEntry.COLUMN_NAME_FORWARD_STATUS,
LogTable.LogEntry.TABLE_NAME + "." + LogTable.LogEntry.COLUMN_NAME_FORWARD_RESPONSE + " AS " + LogTable.LogEntry.COLUMN_NAME_FORWARD_RESPONSE,
RuleTable.RuleEntry.TABLE_NAME + "." + RuleTable.RuleEntry.COLUMN_NAME_FILED + " AS " + RuleTable.RuleEntry.COLUMN_NAME_FILED,
RuleTable.RuleEntry.TABLE_NAME + "." + RuleTable.RuleEntry.COLUMN_NAME_CHECK + " AS " + RuleTable.RuleEntry.COLUMN_NAME_CHECK,
RuleTable.RuleEntry.TABLE_NAME + "." + RuleTable.RuleEntry.COLUMN_NAME_VALUE + " AS " + RuleTable.RuleEntry.COLUMN_NAME_VALUE,
@ -152,6 +170,10 @@ public class LogUtil {
cursor.getColumnIndexOrThrow(LogTable.LogEntry.COLUMN_NAME_SIM_INFO));
String time = cursor.getString(
cursor.getColumnIndexOrThrow(LogTable.LogEntry.COLUMN_NAME_TIME));
int forwardStatus = cursor.getInt(
cursor.getColumnIndexOrThrow(LogTable.LogEntry.COLUMN_NAME_FORWARD_STATUS));
String forwardResponse = cursor.getString(
cursor.getColumnIndexOrThrow(LogTable.LogEntry.COLUMN_NAME_FORWARD_RESPONSE));
String ruleFiled = cursor.getString(
cursor.getColumnIndexOrThrow(RuleTable.RuleEntry.COLUMN_NAME_FILED));
String ruleCheck = cursor.getString(
@ -169,7 +191,7 @@ public class LogUtil {
if (senderName != null) rule += senderName.trim();
int senderImageId = SenderModel.getImageId(senderType);
LogVo logVo = new LogVo(itemid, itemfrom, content, simInfo, time, rule, senderImageId);
LogVo logVo = new LogVo(itemid, itemfrom, content, simInfo, time, rule, senderImageId, forwardStatus, forwardResponse);
LogVos.add(logVo);
} catch (Exception e) {
Log.e(TAG, "getLog e:" + e.getMessage());

View File

@ -22,7 +22,7 @@ public class SmsUtil {
}
}
public static void sendSms(int subId, String mobiles, String message) {
public static String sendSms(int subId, String mobiles, String message) {
mobiles = mobiles.replace("", ";");
Log.d(TAG, "subId = " + subId + ", mobiles = " + mobiles + ", message = " + message);
@ -35,8 +35,11 @@ public class SmsUtil {
for (String text : divideContents) {
smsManager.sendTextMessage(mobiles, null, text, sendPI, deliverPI);
}
return null;
} catch (Exception e) {
Log.e(TAG, e.getMessage());
return e.getMessage();
}
}

View File

@ -0,0 +1,5 @@
<vector android:height="18dp" android:tint="#FF0000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.47,2 2,6.47 2,12s4.47,10 10,10 10,-4.47 10,-10S17.53,2 12,2zM16.3,16.3c-0.39,0.39 -1.02,0.39 -1.41,0L12,13.41 9.11,16.3c-0.39,0.39 -1.02,0.39 -1.41,0 -0.39,-0.39 -0.39,-1.02 0,-1.41L10.59,12 7.7,9.11c-0.39,-0.39 -0.39,-1.02 0,-1.41 0.39,-0.39 1.02,-0.39 1.41,0L12,10.59l2.89,-2.89c0.39,-0.39 1.02,-0.39 1.41,0 0.39,0.39 0.39,1.02 0,1.41L13.41,12l2.89,2.89c0.38,0.38 0.38,1.02 0,1.41z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:height="18dp" android:tint="#00FF00"
android:viewportHeight="24" android:viewportWidth="24"
android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM9.29,16.29L5.7,12.7c-0.39,-0.39 -0.39,-1.02 0,-1.41 0.39,-0.39 1.02,-0.39 1.41,0L10,14.17l6.88,-6.88c0.39,-0.39 1.02,-0.39 1.41,0 0.39,0.39 0.39,1.02 0,1.41l-7.59,7.59c-0.38,0.39 -1.02,0.39 -1.41,0z"/>
</vector>

View File

@ -3,13 +3,26 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/tlog_sender_image"
android:layout_width="32dp"
android:layout_height="32dp"
<LinearLayout
android:layout_width="34dp"
android:layout_height="34dp"
android:layout_alignParentEnd="true"
android:layout_marginLeft="5dp"
android:layout_marginTop="10dp" />
android:layout_marginTop="10dp"
android:orientation="vertical">
<ImageView
android:id="@+id/tlog_sender_image"
android:layout_width="32dp"
android:layout_height="32dp" />
<ImageView
android:id="@+id/tlog_status_image"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginLeft="18dp"
android:layout_marginTop="-14dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
@ -56,6 +69,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginBottom="10dp" />
</LinearLayout>

View File

@ -1,4 +1,4 @@
ext {
appVersionCode = 21
appVersionName = "1.7.0"
appVersionCode = 22
appVersionName = "1.7.1"
}

View File

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