parent
0581a6c383
commit
dc04592f6c
|
@ -4,7 +4,7 @@ android {
|
||||||
compileSdkVersion 29
|
compileSdkVersion 29
|
||||||
buildToolsVersion "29.0.2"
|
buildToolsVersion "29.0.2"
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.finogeeks.mop.demo"
|
applicationId "com.finogeeks.finclip.demo"
|
||||||
minSdkVersion 19
|
minSdkVersion 19
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 1
|
versionCode 1
|
||||||
|
@ -13,9 +13,9 @@ android {
|
||||||
|
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
buildConfigField "String", "APP_KEY", "\"22LyZEib0gLTQdU3MUauAVUHSFDdTToYDWCqr0AgPGwA\""
|
buildConfigField "String", "APP_KEY", "\"22LyZEib0gLTQdU3MUauATBwgfnTCJjdr7FCnywmAEM=\""
|
||||||
// App Secret
|
// App Secret
|
||||||
buildConfigField "String", "APP_SECRET", "\"8c5c3c26420b7e66\""
|
buildConfigField "String", "APP_SECRET", "\"bdfd76cae24d4313\""
|
||||||
// API服务地址
|
// API服务地址
|
||||||
buildConfigField "String", "API_URL", "\"https://mp.finogeeks.com\""
|
buildConfigField "String", "API_URL", "\"https://mp.finogeeks.com\""
|
||||||
// API服务前缀
|
// API服务前缀
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.finogeeks.mop.demo;
|
package com.finogeeks.mop.demo;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
@ -20,17 +21,20 @@ public class MainActivity extends AppCompatActivity {
|
||||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
|
|
||||||
Button canvasButton = findViewById(R.id.btnCanvas);
|
|
||||||
Button demoButton = findViewById(R.id.btnDemo);
|
Button demoButton = findViewById(R.id.btnDemo);
|
||||||
Button profileButton = findViewById(R.id.btnProfile);
|
demoButton.setOnClickListener(new View.OnClickListener() {
|
||||||
canvasButton.setOnClickListener(v -> {
|
@Override
|
||||||
Map<String, String> startParams = new HashMap<>();
|
public void onClick(View v) {
|
||||||
startParams.put("path", "/pages/index/index");
|
FinAppClient.INSTANCE.getAppletApiManager().startApplet(MainActivity.this, "5fa214a29a6a7900019b5cc1");
|
||||||
FinAppClient.INSTANCE.getAppletApiManager().startApplet(MainActivity.this, "5ea03fa563cb900001d73863", startParams);
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
demoButton.setOnClickListener(v -> FinAppClient.INSTANCE.getAppletApiManager().startApplet(MainActivity.this, "5ea0401463cb900001d73865"));
|
Button profileButton = findViewById(R.id.btnProfile);
|
||||||
|
profileButton.setOnClickListener(new View.OnClickListener() {
|
||||||
profileButton.setOnClickListener(v -> FinAppClient.INSTANCE.getAppletApiManager().startApplet(MainActivity.this, "5ea0412663cb900001d73867"));
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
FinAppClient.INSTANCE.getAppletApiManager().startApplet(MainActivity.this, "5fa215459a6a7900019b5cc3");
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -25,12 +25,11 @@ public class MopApplication extends MultiDexApplication {
|
||||||
FinAppConfig.UIConfig uiConfig = new FinAppConfig.UIConfig();
|
FinAppConfig.UIConfig uiConfig = new FinAppConfig.UIConfig();
|
||||||
uiConfig.setHideNavigationBarCloseButton(true);
|
uiConfig.setHideNavigationBarCloseButton(true);
|
||||||
FinAppConfig config = new FinAppConfig.Builder()
|
FinAppConfig config = new FinAppConfig.Builder()
|
||||||
.setAppKey(BuildConfig.APP_KEY)
|
.setSdkKey(BuildConfig.APP_KEY)
|
||||||
.setAppSecret(BuildConfig.APP_SECRET)
|
.setSdkSecret(BuildConfig.APP_SECRET)
|
||||||
.setApiUrl(BuildConfig.API_URL)
|
.setApiUrl(BuildConfig.API_URL)
|
||||||
.setApiPrefix(BuildConfig.API_PREFIX)
|
.setApiPrefix(BuildConfig.API_PREFIX)
|
||||||
.setDebugMode(BuildConfig.DEBUG)
|
.setDebugMode(BuildConfig.DEBUG)
|
||||||
.setGlideWithJWT(false)
|
|
||||||
.setUiConfig(uiConfig)
|
.setUiConfig(uiConfig)
|
||||||
.setEncryptionType(FinAppConfig.ENCRYPTION_TYPE_SM)
|
.setEncryptionType(FinAppConfig.ENCRYPTION_TYPE_SM)
|
||||||
.build();
|
.build();
|
||||||
|
|
|
@ -8,43 +8,25 @@
|
||||||
tools:context=".MainActivity"
|
tools:context=".MainActivity"
|
||||||
tools:showIn="@layout/activity_main">
|
tools:showIn="@layout/activity_main">
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btnCanvas"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="172dp"
|
|
||||||
android:text="打开画图小程序"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnDemo"
|
android:id="@+id/btnDemo"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="20dp"
|
android:text="@string/fin_clip_demo_applet"
|
||||||
android:text="打开官方小程序"
|
app:layout_constraintBottom_toTopOf="@+id/btnProfile"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/btnCanvas" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_chainStyle="packed" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnProfile"
|
android:id="@+id/btnProfile"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:text="智能对账单"
|
android:text="@string/fin_clip_profile_applet"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/btnDemo" />
|
app:layout_constraintTop_toBottomOf="@+id/btnDemo" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
|
||||||
android:id="@+id/barrier"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:barrierDirection="left" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,10 +0,0 @@
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
tools:context="com.finogeeks.mop.demo.MainActivity">
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_settings"
|
|
||||||
android:orderInCategory="100"
|
|
||||||
android:title="@string/action_settings"
|
|
||||||
app:showAsAction="never" />
|
|
||||||
</menu>
|
|
|
@ -1,4 +1,5 @@
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">mopdemo</string>
|
<string name="app_name">mopdemo</string>
|
||||||
<string name="action_settings">Settings</string>
|
<string name="fin_clip_demo_applet">官方小程序</string>
|
||||||
|
<string name="fin_clip_profile_applet">智能对账单</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue