no bug bank
parent
6d385d16e8
commit
228ffd1400
|
|
@ -32,6 +32,7 @@ public class BankNfcPlugins implements MethodCallHandler {
|
|||
this.activity = activity;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onMethodCall(MethodCall call, Result result) {
|
||||
switch (call.method) {
|
||||
|
|
|
|||
|
|
@ -7,11 +7,14 @@ import io.flutter.embedding.android.FlutterActivity
|
|||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import io.flutter.plugins.GeneratedPluginRegistrant
|
||||
import kz.com.aman.kassa.bank.M4BankActivity
|
||||
import kz.com.aman.kassa.plugins.BankNfcPlugins
|
||||
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
private val EXTERNAL_INPUT_DATA_KEY = "ru.m4bank.ExternalApplication.InputDataKey";
|
||||
private val EXTERNAL_RESULT_DATA_KEY = "ru.m4bank.ExternalApplication.ResultDataKey";
|
||||
private val EXTERNAL_OPERATION_TYPE_KEY = "ru.m4bank.ExternalApplication.OperationTypeKey";
|
||||
|
||||
private val BANK_CHANNEL = "channel:com.amanKassa/bank"
|
||||
private val ACTIVITY_CHANNEL = "channel:com.amanKassa/activity"
|
||||
|
||||
|
|
@ -20,19 +23,6 @@ class MainActivity: FlutterActivity() {
|
|||
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
|
||||
GeneratedPluginRegistrant.registerWith(flutterEngine);
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, BANK_CHANNEL).setMethodCallHandler(BankNfcPlugins(this));
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, ACTIVITY_CHANNEL).setMethodCallHandler {
|
||||
// Note: this method is invoked on the main thread.
|
||||
call, result ->
|
||||
if (call.method == "start") {
|
||||
_result = result
|
||||
val intent= Intent(this, M4BankActivity::class.java)
|
||||
startActivityForResult(intent, 8989)
|
||||
|
||||
//result.success("ActivityStarted")
|
||||
} else {
|
||||
result.notImplemented()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue