Skip to content
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

Can I use this plugin inside the background runner capacitor plugin? #553

Open
vycoder opened this issue May 1, 2024 · 2 comments
Open

Comments

@vycoder
Copy link

vycoder commented May 1, 2024

I'm working on an app where I use this plugin mainly for offline functionality, but while online I perform certain replication functions to update the offline database as the app is being used. I'm running all this logic in the main thread but I'm wondering if I can leverage Capacitor's Background Task Runner(https://capacitorjs.com/docs/v5/apis/background-runner) along with this plugin.

Or is my approach may not be the correct one? I would appreciate if anyone can shed light on this or can point me in the right direction.

@petterbergman
Copy link

Currently capacitor doesn't let you use plugins in the background runner. Only the libraries they have statically added are available, which is pretty much just CapacitorKV and fetch. Using those, you can get data from your server, but you won't be able to write the data to Sqlite.

The capacitor team has indicated they're hoping to have this working in the future, but no timeline or specifics.

@jepiqueau
Copy link
Collaborator

@petterbergman thanks for the info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants