diff --git a/android/app/build.gradle b/android/app/build.gradle index 6a106eb..962e39c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -91,15 +91,12 @@ dependencies { implementation deps.hardware.spirelib implementation deps.hardware.icmp.values() implementation deps.hardware.atol.values() -// if (buildType.buildType == 'NFC') { -// implementation deps.hardware.softpos.softpaylibrary -// implementation deps.hardware.softpos.softpay_dependencies -// } else { -// implementation deps.hardware.aisino.a90.values() -// } - //implementation deps.hardware.softpos.softpaylibrary - //implementation deps.hardware.softpos.softpay_dependencies - implementation deps.hardware.aisino.a90.values() + if (buildType.buildType == 'NFC') { + implementation deps.hardware.softpos.softpaylibrary + implementation deps.hardware.softpos.softpay_dependencies + } else { + implementation deps.hardware.aisino.a90.values() + } implementation deps.hardware.shtrih.values() implementation deps.hardware.redlib diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 2ae6c62..34804ae 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -21,7 +21,7 @@ android:roundIcon="@mipmap/ic_launcher_rounded" android:usesCleartextTraffic="true"> - + Toast.makeText(activity, result.getResultType() + " " + (result.getDescription() == null ? "" : result.getDescription()) + " " + result.isOnlineRegistration(), Toast.LENGTH_SHORT).show()); + activity.runOnUiThread(() -> + Toast.makeText(activity, result.getResultType() + " " + (result.getDescription() == null ? "" : result.getDescription()) + " " + result.isOnlineRegistration(), Toast.LENGTH_SHORT).show()); } @Override diff --git a/android/app/src/main/java/kz/com/aman/kassa/bank/M4BankActivity.java b/android/app/src/main/java/kz/com/aman/kassa/bank/M4BankActivity.java index ac4d241..9973cb7 100644 --- a/android/app/src/main/java/kz/com/aman/kassa/bank/M4BankActivity.java +++ b/android/app/src/main/java/kz/com/aman/kassa/bank/M4BankActivity.java @@ -408,6 +408,7 @@ public class M4BankActivity extends FlutterActivity { //////////// отправка данных для регистрации mpos - дополнительный функционал при активации////////////// findViewById(R.id.sendRegisterRequest).setOnClickListener(v -> { String url = "https://test.ponkratenko.ru"; + //String savedServerUrl = PreferencesManager.loadStringField(this, PreferencesManager.Field.SERVER_URL, getString(R.string.default_server_address_mpos_5_0_test)); clientInterface.getConfigurationManager() .sendRegisterRequest(sendRegisterRequestCallbackHandler, getRegisterRequestData(), url); }); diff --git a/android/app/src/main/res/layout/activity_main.xml b/android/app/src/main/res/layout/activity_main.xml index 771ce23..1c516c0 100644 --- a/android/app/src/main/res/layout/activity_main.xml +++ b/android/app/src/main/res/layout/activity_main.xml @@ -3,7 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - tools:context="com.example.aman_kassa_flutter.bank.M4BankActivity"> + tools:context=".bank.M4BankActivity"> http://10.45.49.31:29978 http://sbertest.m4bank.ru:21017 - http://10.31.0.40:5000 + http://185.98.84.231:2000 Check access Get available operations diff --git a/android/build.gradle b/android/build.gradle index a2a8a70..f9cc5b8 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -11,7 +11,7 @@ buildscript { } ext.buildType = [ - 'buildType': '' + 'buildType': 'NFC' ] ext.versions = [ @@ -91,7 +91,7 @@ buildscript { "spirelib" : "m4bank:spirelib:138", "softpos" : [ "softpaylibrary" : "m4bank:softpaylibrary:41@aar", - "softpay_dependencies": "m4bank:softpay_dependencies:1.1.1.53@aar", + "softpay_dependencies": "m4bank:softpay_dependencies:1.1.1.52@aar", ], "sunmi" : "m4bank:sunmiv1printerlibrary:5", "redlib" : "m4bank:redlib:1",