diff --git a/app/build.gradle b/app/build.gradle
index e11bcf0c..40a5ac75 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -31,9 +31,6 @@ android {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86'//, 'x86_64'
}
}
- lintOptions {
- checkReleaseBuilds false
- }
signingConfigs {
release {
keyAlias keyProps['keyAlias']
@@ -52,13 +49,13 @@ android {
release {
minifyEnabled false
//shrinkResources true
- //proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
minifyEnabled false
//shrinkResources true
- //proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug
}
}
@@ -72,6 +69,11 @@ android {
}
}
def abiCodes = ['universal': 1, 'armeabi-v7a': 2, 'arm64-v8a': 3, 'x86': 4, 'x86_64': 5]
+ packagingOptions {
+ resources {
+ excludes += ['META-INF/DEPENDENCIES.txt', 'META-INF/LICENSE.txt', 'META-INF/NOTICE.txt', 'META-INF/NOTICE', 'META-INF/LICENSE', 'META-INF/DEPENDENCIES', 'META-INF/notice.txt', 'META-INF/license.txt', 'META-INF/dependencies.txt', 'META-INF/LGPL2.1']
+ }
+ }
android.applicationVariants.all { variant ->
// Assigns a different version code for each output APK.
variant.outputs.each {
@@ -80,21 +82,12 @@ android {
def abiName = output.getFilter(com.android.build.OutputFile.ABI)
if (abiName == null) abiName = "universal"
output.versionCodeOverride = abiCodes.get(abiName, 0) * 100000 + variant.versionCode
- output.outputFileName = "SmsForwarder_${variant.name}_${versionName}_${output.versionCodeOverride}_${date}_${abiName}.apk"
+ output.outputFileName = "SmsForwarder_${variant.name}_${versionName}_${output.versionCode}_${date}_${abiName}.apk"
}
}
- packagingOptions {
- exclude 'META-INF/DEPENDENCIES.txt'
- exclude 'META-INF/LICENSE.txt'
- exclude 'META-INF/NOTICE.txt'
- exclude 'META-INF/NOTICE'
- exclude 'META-INF/LICENSE'
- exclude 'META-INF/DEPENDENCIES'
- exclude 'META-INF/notice.txt'
- exclude 'META-INF/license.txt'
- exclude 'META-INF/dependencies.txt'
- exclude 'META-INF/LGPL2.1'
+ lint {
+ checkReleaseBuilds false
}
}
@@ -138,7 +131,6 @@ void cmdExecute(String cmd) {
println cmd.execute().text
}
-
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleDependency
@@ -146,7 +138,7 @@ dependencies {
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.5.0'
+ //implementation 'com.google.android.material:material:1.5.0'
//noinspection GradleDynamicVersion
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
@@ -160,12 +152,6 @@ dependencies {
//fastjson
implementation "com.alibaba:fastjson:1.2.79"
- //友盟统计SDK
- implementation 'com.umeng.umsdk:common:9.4.6'// 必选
- implementation 'com.umeng.umsdk:asms:1.6.0'// asms包依赖必选
- implementation 'com.umeng.umsdk:apm:1.5.2'// 错误分析升级为独立SDK,看crash数据请一定集成,可选
- //implementation 'com.umeng.umsdk:abtest:1.0.0'//使用U-App中ABTest能力,可选
-
//XUpdate
implementation 'com.github.xuexiangjys:XUpdate:2.1.1'
implementation 'com.github.xuexiangjys.XUpdateAPI:xupdate-easy:1.0.1'
@@ -194,4 +180,11 @@ dependencies {
implementation "org.eclipse.jetty:jetty-server:9.2.30.v20200428"
implementation "org.eclipse.jetty:jetty-servlet:9.2.30.v20200428"
+ //FloatingActionButton
+ implementation 'com.melnykov:floatingactionbutton:1.3.0'
+
+ //友盟统计SDK
+ implementation 'com.umeng.umsdk:common:9.4.7'// (必选)
+ implementation 'com.umeng.umsdk:asms:1.6.0'// 必选
+
}
\ No newline at end of file
diff --git a/app/src/main/java/com/idormy/sms/forwarder/MainActivity.java b/app/src/main/java/com/idormy/sms/forwarder/MainActivity.java
index b9e772c4..17927281 100644
--- a/app/src/main/java/com/idormy/sms/forwarder/MainActivity.java
+++ b/app/src/main/java/com/idormy/sms/forwarder/MainActivity.java
@@ -26,7 +26,6 @@ import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
-import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.hjq.permissions.OnPermissionCallback;
import com.hjq.permissions.Permission;
import com.hjq.permissions.XXPermissions;
@@ -50,6 +49,7 @@ import com.idormy.sms.forwarder.utils.SharedPreferencesHelper;
import com.idormy.sms.forwarder.utils.SmsUtil;
import com.idormy.sms.forwarder.utils.TimeUtil;
import com.idormy.sms.forwarder.view.StepBar;
+import com.melnykov.fab.FloatingActionButton;
import com.umeng.commonsdk.UMConfigure;
import java.lang.reflect.Method;
diff --git a/app/src/main/java/com/idormy/sms/forwarder/RuleActivity.java b/app/src/main/java/com/idormy/sms/forwarder/RuleActivity.java
index 939cfb45..4b121a70 100644
--- a/app/src/main/java/com/idormy/sms/forwarder/RuleActivity.java
+++ b/app/src/main/java/com/idormy/sms/forwarder/RuleActivity.java
@@ -23,7 +23,6 @@ import android.widget.Toast;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
-import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.idormy.sms.forwarder.adapter.RuleAdapter;
import com.idormy.sms.forwarder.model.RuleModel;
import com.idormy.sms.forwarder.model.SenderModel;
@@ -35,6 +34,7 @@ import com.idormy.sms.forwarder.utils.LogUtil;
import com.idormy.sms.forwarder.utils.RuleUtil;
import com.idormy.sms.forwarder.utils.SettingUtil;
import com.idormy.sms.forwarder.view.StepBar;
+import com.melnykov.fab.FloatingActionButton;
import java.util.ArrayList;
import java.util.Date;
@@ -133,11 +133,11 @@ public class RuleActivity extends AppCompatActivity {
//计算浮动按钮位置
- FloatingActionButton btnFloat = findViewById(R.id.btnFloat);
- CommonUtil.calcMarginBottom(this, btnFloat, listView, null);
+ FloatingActionButton btnAddRule = findViewById(R.id.btnAddRule);
+ CommonUtil.calcMarginBottom(this, btnAddRule, listView, null);
//添加规则
- btnFloat.setOnClickListener(v -> setRule(null, false));
+ btnAddRule.setOnClickListener(v -> setRule(null, false));
//步骤完成状态校验
StepBar stepBar = findViewById(R.id.stepBar);
diff --git a/app/src/main/java/com/idormy/sms/forwarder/SenderActivity.java b/app/src/main/java/com/idormy/sms/forwarder/SenderActivity.java
index 23027d97..62011460 100644
--- a/app/src/main/java/com/idormy/sms/forwarder/SenderActivity.java
+++ b/app/src/main/java/com/idormy/sms/forwarder/SenderActivity.java
@@ -38,7 +38,6 @@ import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import com.alibaba.fastjson.JSON;
-import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.idormy.sms.forwarder.adapter.SenderAdapter;
import com.idormy.sms.forwarder.model.SenderModel;
import com.idormy.sms.forwarder.model.vo.BarkSettingVo;
@@ -72,6 +71,7 @@ import com.idormy.sms.forwarder.utils.LogUtil;
import com.idormy.sms.forwarder.utils.RuleUtil;
import com.idormy.sms.forwarder.view.ClearEditText;
import com.idormy.sms.forwarder.view.StepBar;
+import com.melnykov.fab.FloatingActionButton;
import java.net.Proxy;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/idormy/sms/forwarder/utils/CommonUtil.java b/app/src/main/java/com/idormy/sms/forwarder/utils/CommonUtil.java
index 104e8a61..9a05b59d 100644
--- a/app/src/main/java/com/idormy/sms/forwarder/utils/CommonUtil.java
+++ b/app/src/main/java/com/idormy/sms/forwarder/utils/CommonUtil.java
@@ -17,9 +17,9 @@ import android.widget.ScrollView;
import androidx.core.app.ActivityCompat;
import androidx.core.app.NotificationManagerCompat;
-import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.idormy.sms.forwarder.MyApplication;
import com.idormy.sms.forwarder.service.NotifyService;
+import com.melnykov.fab.FloatingActionButton;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 72fe2aa2..b70facc5 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
-
+ app:fabSize="mini" />-->
+
+
-
+ app:fabSize="mini" />-->
+
+
-
+ app:fabSize="mini" />-->
+
+
ServerChan\'s SendKey
ApiToken or Custom address
ChatId
- Method
+ Method
WebServer
e.g. https://a.b.com/msg?token=xyz
WebParams
@@ -170,7 +170,7 @@
SIM2 Label
Label of SIM,\neg. AT&T_88888888
Low power alarm
- Value range: 0–100.\nLeft blank or 0 is disabled
+ Value range: 0–99.\nLeft blank or 0 is disabled
Retry interval
Disabled when times = 0,\nthe interval is incremented
Forward sms
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 20b3d843..c62ab6e5 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -153,7 +153,7 @@
Server酱·Turbo版的SendKey
Telegram机器人的ApiToken 或 自定义地址(http开头)
被通知人(或群组)的ChatId
- 请求方式
+ 请求方式
WebServer
例如:https://a.b.com/msg?token=xyz
WebParams
@@ -170,7 +170,7 @@
SIM2备注
运营商_手机号
电量预警阈值(%)
- 取值范围:0–100,0禁用
+ 取值范围:0–99,0禁用
请求接口失败重试
次数=0时禁用,间隔逐次递增
转发短信广播