smsign方法
parent
b2228b32fe
commit
f2e161e4d2
|
@ -9,6 +9,7 @@ import com.finogeeks.mop.api.mop.AppletModule;
|
||||||
import com.finogeeks.mop.api.mop.BaseModule;
|
import com.finogeeks.mop.api.mop.BaseModule;
|
||||||
import com.finogeeks.mop.api.mop.ExtensionApiModule;
|
import com.finogeeks.mop.api.mop.ExtensionApiModule;
|
||||||
import com.finogeeks.mop.api.mop.VersionModule;
|
import com.finogeeks.mop.api.mop.VersionModule;
|
||||||
|
import com.finogeeks.mop.api.mop.SmSignModule;
|
||||||
import com.finogeeks.mop.interfaces.Event;
|
import com.finogeeks.mop.interfaces.Event;
|
||||||
import com.finogeeks.mop.interfaces.IApi;
|
import com.finogeeks.mop.interfaces.IApi;
|
||||||
|
|
||||||
|
@ -69,6 +70,7 @@ public class ApisManager {
|
||||||
add(new AppletHandlerModule(activity));
|
add(new AppletHandlerModule(activity));
|
||||||
add(new ExtensionApiModule(activity));
|
add(new ExtensionApiModule(activity));
|
||||||
add(new VersionModule(activity));
|
add(new VersionModule(activity));
|
||||||
|
add(new SmSignModule(activity));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void add(IApi api) {
|
private void add(IApi api) {
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.finogeeks.mop.api.mop;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.finogeeks.finochat.sdkcore.client.FinoChatSDKCoreClient;
|
||||||
|
import com.finogeeks.lib.applet.client.FinAppClient;
|
||||||
|
import com.finogeeks.lib.applet.db.entity.FinApplet;
|
||||||
|
import com.finogeeks.mop.api.BaseApi;
|
||||||
|
import com.finogeeks.mop.interfaces.ICallback;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class SmSignModule extends BaseApi {
|
||||||
|
|
||||||
|
public SmSignModule(Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] apis() {
|
||||||
|
return new String[]{"smsign"};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invoke(String event, Map param, ICallback callback) {
|
||||||
|
String text = (String) param.get("plainText");
|
||||||
|
String result = FinoChatSDKCoreClient.getInstance().finoLicenseService().messageDigest(text);
|
||||||
|
Map<String, Object> res = new HashMap<>();
|
||||||
|
res.put("data", result);
|
||||||
|
callback.onSuccess(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue