[SOLVED] Working with cordova plugins in Quasar
-
I’m new to quasar (I’m using v0.15) and cordova, I need to use a certain plugin: Insomnia.
What’s the best practice or recommended approach in using such plugins within Quasar?
After adding the plugin, I need to use the actual api by invoking
window.plugins.insomnia.keepAwake()
, I was wondering where should Implement this? Will this be automatically available in my app upon adding the plugin, or should Icd
in tosrc-cordova
and implement it there?Lastly, I take it that whatever the approach was, would work to all cordova plugins that I would need to add in the future?
-
Was able to solve this, Razvan gave me a link when I inquired on the gitter channel: Cordova Plugins This will surely be available upon the release of v0.15 docs.
Although I encountered some problems as well,
- Plugin’s codes didn’t work whenever I used it on
App.vue
but it worked on other vue files. This must be a vue or vue template thing, just haven’t got the time to figure it out. Maybe you guys know the answer. - I’m using
cordova run
to make my changes ‘persist’. Usingquasar dev -m cordova
won’t really work when the device is not plugged in. I have to do aquasar build -m cordova
before I runcordova run
though or else changes that I see onquasar dev -m cordova
will not reflect.
Again, there might a proper way of doing this. Things will probably get clearer when v0.15 docs came out.
- Plugin’s codes didn’t work whenever I used it on