-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to acess other capacitor plugins like sqlite in backgroundTasks. #67
Comments
Did you find a solution? |
@theproducer do you have any idea when this might become possible? I think lots of people need SQLite to do their work 😅 |
Just my two cents, if somehow we made the capacitor plugin work inside the background worker, that would be far more powerful. And I know that currently, we have put functions statically built in aar file. Can put functionality to pass flags during compilation and include all required native code built inside aar files? |
Hey guys, we had the same requirement and went in a different direction based on the ideas of this repo: https://github.com/atroo/capacitor-background-runner-ng/tree/main We are using a wrapper to generate the c++ bindings automatically for kotlin and we used the existing capacitor bridge, adapted it to be used in quick.js and created a PoC, where I could run the normal capacitor-sqlite and capacitor-app plugins without problems. To move forward we need to merge this MR: ionic-team/capacitor#7709 into capacitor-android. Basically it makes PluginCall.java more usable as it accepts an interface of an messagehandler instead of the existing messagehandler class. Any changes this will be merged soon @PratikBodawala ? |
Hello everyone! Yes, this has been one of known the limitations currently of BR since its release. We are working on brainstorming a solution that will theoretically allow all (at least the ones that make sense) Capacitor plugins usable within Background Runner. I should be posting a roadmap soon for things directly related to Background Runner (and Capacitor Watch). @phal0r Expect more details coming soon! |
Hi @theproducer , thanks for clarification. If it won't be merged, it makes no sense to review it :) I would highly appreciate a roadmap about the direction of the capacitor to drive the community, especially if you plan to address the current biggest shortcomings. This will strengthen the trust in the project and make it easier to discuss using it in projects. If you want to have more information about our take on background runner, feel free to reach out to me. |
I am currently working on a project where I need to synchronize the local SQLite database of my app with the server. To achieve this, I am considering using a background runner plugin to fecth data from db and make POST requests. But not finding any way to acess sqlite db inside background task and make post requests.
The text was updated successfully, but these errors were encountered: