diff --git a/app/build.gradle b/app/build.gradle
index ca5548e..f21eb7b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -5,15 +5,25 @@ android {
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.finogeeks.mop.demo"
- minSdkVersion 26
+ minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+
+ multiDexEnabled true
+
+ buildConfigField "String", "APP_KEY", "\"22LyZEib0gLTQdU3MUauAVUHSFDdTToYDWCqr0AgPGwA\""
+ // App Secret
+ buildConfigField "String", "APP_SECRET", "\"8c5c3c26420b7e66\""
+ // API服务地址
+ buildConfigField "String", "API_URL", "\"https://mp.finogeeks.com\""
+ // API服务前缀
+ buildConfigField "String", "API_PREFIX", "\"/api/v1/mop/\""
}
buildTypes {
release {
- minifyEnabled false
+ minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
@@ -21,16 +31,22 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
+ packagingOptions {
+ // libsdkcore.so是被加固过的,不能被压缩,否则加载动态库时会报错
+ doNotStrip "*/x86/libsdkcore.so"
+ doNotStrip "*/x86_64/libsdkcore.so"
+ doNotStrip "*/armeabi-v7a/libsdkcore.so"
+ doNotStrip "*/arm64-v8a/libsdkcore.so"
+ }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'androidx.appcompat:appcompat:1.0.2'
- implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
- implementation 'com.google.android.material:material:1.0.0'
+ implementation 'androidx.appcompat:appcompat:1.2.0'
+ implementation 'androidx.constraintlayout:constraintlayout:2.0.0'
+ implementation 'com.google.android.material:material:1.2.0'
testImplementation 'junit:junit:4.12'
- androidTestImplementation 'androidx.test:runner:1.1.1'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
- implementation 'com.finogeeks.lib:finapplet:+'
-
-}
+ androidTestImplementation 'androidx.test:runner:1.2.0'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
+ implementation 'com.finogeeks.lib:finapplet:2.11.13'
+}
\ No newline at end of file
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
index f1b4245..cf19ffb 100644
--- a/app/proguard-rules.pro
+++ b/app/proguard-rules.pro
@@ -19,3 +19,5 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
+
+-keep class com.finogeeks.** {*;}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 5f75326..e8521d7 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -3,11 +3,13 @@
package="com.finogeeks.mop.demo">
+
-
\ No newline at end of file
diff --git a/app/src/main/java/com/finogeeks/mop/demo/MainActivity.java b/app/src/main/java/com/finogeeks/mop/demo/MainActivity.java
index dae407c..81d18eb 100644
--- a/app/src/main/java/com/finogeeks/mop/demo/MainActivity.java
+++ b/app/src/main/java/com/finogeeks/mop/demo/MainActivity.java
@@ -1,124 +1,36 @@
package com.finogeeks.mop.demo;
import android.os.Bundle;
-
-import com.finogeeks.lib.applet.client.FinAppClient;
-import com.finogeeks.lib.applet.client.FinAppConfig;
-import com.finogeeks.lib.applet.interfaces.FinCallback;
-import com.google.android.material.floatingactionbutton.FloatingActionButton;
-import com.google.android.material.snackbar.Snackbar;
+import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
-import android.view.View;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.widget.Button;
-import android.widget.Toast;
+import com.finogeeks.lib.applet.client.FinAppClient;
import java.util.HashMap;
+import java.util.Map;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- if (FinAppClient.INSTANCE.isFinAppProcess(this)) {
- return;
- }
setContentView(R.layout.activity_main);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
- FinAppConfig config = new FinAppConfig.Builder()
- .setAppKey("22LyZEib0gLTQdU3MUauAVUHSFDdTToYDWCqr0AgPGwA")
- .setAppSecret("8c5c3c26420b7e66")
- .setApiUrl("https://mp.finogeeks.com")
- .setApiPrefix("/api/v1/mop")
- .setGlideWithJWT(false)
- .build();
-// SDK初始化结果回调,用于接收SDK初始化状态
- FinCallback