[Foreign(Language.Java)]
static Java.Object GetWaveSdk()
@{
String API_KEY = "abcd";
DecoderHandler waveHandler = new DecoderHandler() {
@Override
protected void initializeStart() {
}
@Override
protected void initializeSuccess(InitializeResult initializeResult) {
}
@Override
protected void initializeFail(InitializeResult initializeResult) {
}
@Override
protected void scanStop() {
}
@Override
protected void scanVerifying() {
}
@Override
protected void scanFinished(ScanResult scanResult) {
}
@Override
protected void scanError(ScanResult scanResult) {
}
};
WaveSdk waveSdk = new WaveSdk(waveHandler, API_KEY, com.fuse.Activity.getRootActivity().getApplicationContext());
Log.d("WaveSdk", "waveSdk Created.");
return waveSdk;
@}
Uno.Exception: Unexpected Uno.Exception —> Uno.Exception: java.lang.RuntimeException: Can’t create handler inside thread that has not called Looper.prepare()
at Android.Base.JNI.CheckException(Android.Base.Primitives.JNIEnvPtr,[string])
at Android.Base.JNI.CheckException(Android.Base.Primitives.JNIEnvPtr)
at Android.Base.Wrappers.JavaObjectHelper.JObjectToJWrapper(Android.Base.Primitives.ujobject,bool)
at Mobidoo.Sound.MobidooSoundAPI.CheckKey()
at Mobidoo.Sound.MobidooSoundJavaScript.CheckKey(Fuse.Scripting.Context,object[])
at Fuse.Scripting.NativeFunction.NativeFunctionClosure.Callback(Fuse.Scripting.Context,object[])
at Fuse.Scripting.V8.Marshaller.CallbackWrapper.Call(Fuse.Scripting.V8.Simple.JSValue[],Fuse.Scripting.V8.Simple.JSValue&)
at Fuse.Scripting.V8.V8SimpleExtensions.Call(Fuse.Scripting.V8.Simple.JSFunction,Fuse.Scripting.V8.Simple.JSContext,Fuse.Scripting.V8.Simple.JSObject,Fuse.Scripting.V8.Simple.JSValue[],Fuse.Scripting.V8.AutoReleasePool,Uno.Action<Fuse.Scripting.V8.Simple.JSScriptException>)
at Fuse.Scripting.V8.Function.Call(Fuse.Scripting.Context,object[])
at Fuse.Scripting.FunctionMirror.CallClosure.Call(Fuse.Scripting.Context)
at Fuse.Scripting.JavaScript.ThreadWorker.RunOnce(Fuse.Scripting.JavaScript.JSContext)
at Fuse.Scripting.JavaScript.ThreadWorker.RunInner(Fuse.Scripting.JavaScript.JSContext)
at Fuse.Scripting.JavaScript.ThreadWorker.Run()
at Uno.Threading.Thread.ThreadMain(Uno.Threading.Thread)
— End of inner exception stack trace —
at Fuse.Scripting.V8.Context.ThrowPendingExceptions()
at Fuse.Scripting.V8.Function.Call(Fuse.Scripting.Context,object[])
at Fuse.Scripting.FunctionMirror.CallClosure.Call(Fuse.Scripting.Context)
at Fuse.Scripting.JavaScript.ThreadWorker.RunOnce(Fuse.Scripting.JavaScript.JSContext)
at Fuse.Scripting.JavaScript.ThreadWorker.RunInner(Fuse.Scripting.JavaScript.JSContext)
at Fuse.Scripting.JavaScript.ThreadWorker.Run()
at Uno.Threading.Thread.ThreadMain(Uno.Threading.Thread)