initNativeSdk static method
Implementation
static int initNativeSdk(String appid, String secret, String codes,{DynamicLibrary? nativeLib}) {
nativeLib ??= dynLibrary;
initDynamicLib(nativeLib!);
regResponseIf (nativeLib);
if (kDebugMode) {
clingNative.cwsEnableLog(1);
}
Pointer<SdkRegistration> regParams = malloc<SdkRegistration>();
regParams.ref.codes = codes.toNativeUtf8();
final code = clingNative.cwsRegister(appid.toNativeUtf8(), secret.toNativeUtf8(), regParams);
if (code == 1) {
clingNative.cwsInit();
}
malloc.free(regParams);
slog('initNativeSdk: exit.');
return code;
}