Open KG3RK3N opened 4 years ago
Same here... On simulator it works pretty well...but on real device not at all.
+1 seems to work only on older devices < Android 9
have a look here:
https://github.com/NativeScript/android-runtime/issues/1602
if you run on with android@6.4.0 it should work
I have the issue that I run a worker, terminate after execution and than I run the worker later again (application was not closed) its crashed with exceptions. It looks that java no more usable.
I have tested it in the angular example typescript worker too. To try it out, start worker and terminate when "onmessage" fired. Log messages from the "onerror" worker event. Start new instance of the worker ->
Uncaught TypeError: android.os.Looper.myLooper is not a function
For hmr is that very annoying because the WorkerService terminates on destroy. On every application change, the workers are unussable. Only after the application full restarted, the workers would works again.
On the nativescript multithreading guidlines its recommended, that I terminate the worker after execution.