Capacitor is not a seamless technology for porting functionalities from javascript to Android: Asynchronosity is not supported? #5214
Unanswered
infinitronic
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone.
I just tested my first Javascript project bundled into an android app using Capacitor, and most functionalities do not work.
From low level Javascript functionalities like incrementing of variables trigered by events, to speech and other sound functionalities... They just don't work, at all. All these functionalities work everywhere else - i.e. the web and electron, off the same base code.
Is there something I'm missing here? Promises are used a lot on the project, and from my observation of the android app, it does appear to be somewhat synchronous. This is weird becvause the docs for Capacitor states that Google Chrome is used - and the Chrome Javascript engine supports the full capabilitites of Javascript (which is what I expected i.e. a natural seamless transport of all functionalities to the Android platform). Localforage is used as the database API...
I've tried debugging using the problems highlighted in Android Studio's Problems pane: most of them are not really problems e.g. suggesting that "localforage" is a typographic error...
How do I even debug this? I've read the debugging documentation in Capacitor's Docs: I had hitherto included localforage and math.js directly by downloading their source codes and using script tags to include them via html. However, just to see if it's the issue, I installed both dependencies using npm and then resync'ed the project (with "npx cap sync android" and then syncing the gradle files), in line with the last item on the troubleshooting documentation: but it did not work.
What could be the problem?
Beta Was this translation helpful? Give feedback.
All reactions