diff --git a/android/build.gradle b/android/build.gradle index ddb2708..d8876e9 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -91,6 +91,6 @@ kapt { } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.finogeeks.lib:finapplet:2.37.3' - implementation 'com.finogeeks.mop:plugins:2.37.3' + implementation 'com.finogeeks.lib:finapplet:2.37.4-alpha20220727v13' + implementation 'com.finogeeks.mop:plugins:2.37.1' } \ No newline at end of file diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java index 48deed5..c16941a 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java @@ -7,6 +7,7 @@ import android.util.Log; import com.finogeeks.lib.applet.client.FinAppClient; import com.finogeeks.lib.applet.interfaces.FinCallback; import com.finogeeks.lib.applet.client.FinAppInfo; +import com.finogeeks.lib.applet.sdk.api.request.IFinAppletRequest; import com.finogeeks.lib.applet.sdk.model.StartAppletDecryptRequest; import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.interfaces.ICallback; @@ -68,7 +69,13 @@ public class AppletModule extends BaseApi { Log.d(TAG, "openApplet:" + appId + "," + param + "," + sequence + "," + apiServer); if (apiServer != null) { - FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, apiServer, appId, sequence, startParams,null); + FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, + IFinAppletRequest.Companion.fromAppId(apiServer, appId) + .setStartParams(startParams) + .setSequence(sequence), + null + ); +// FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, apiServer, appId, sequence, startParams,null); } else { FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId, sequence, startParams,null); } @@ -113,13 +120,14 @@ public class AppletModule extends BaseApi { private void scanOpenApplet(Map param, ICallback callback) { String info = String.valueOf(param.get("info")); - FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, new StartAppletDecryptRequest(info),null); + FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, IFinAppletRequest.Companion.fromDecrypt(info), null); +// FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, new StartAppletDecryptRequest(info),null); callback.onSuccess(new HashMap()); } private void qrcodeOpenApplet(Map param, ICallback callback){ String qrcode = String.valueOf(param.get("qrcode")); - FinAppClient.INSTANCE.getAppletApiManager().startAppletByQrcode(mContext, qrcode, new FinCallback() { + FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, IFinAppletRequest.Companion.fromQrCode(qrcode), new FinCallback() { @Override public void onSuccess(String s) { callback.onSuccess(new HashMap()); @@ -139,6 +147,26 @@ public class AppletModule extends BaseApi { } }); + /*FinAppClient.INSTANCE.getAppletApiManager().startAppletByQrcode(mContext, qrcode, new FinCallback() { + @Override + public void onSuccess(String s) { + callback.onSuccess(new HashMap()); + } + + @Override + public void onError(int i, String s) { + callback.onFail(new HashMap(){ + { + put("info",s); + } + }); + } + + @Override + public void onProgress(int i, String s) { + + } + });*/ } private void changeUserId(Map param, ICallback callback) {