-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat(mobile): add background cloud sync for mobile app #12138
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
Open
avelino
wants to merge
6
commits into
logseq:master
Choose a base branch
from
avelino:avelino/background-cloud-sync
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Introduce `frontend.mobile.sync-background` namespace to manage cloud sync when the mobile app is backgrounded. - Track app state, network connectivity, and background sync status using atoms. - Provide functions to handle app state and network changes. - Ensure sync only triggers when app is backgrounded, network is connected, and sync is enabled. - Integrate with storage and state modules for sync control. This enables reliable background syncing for mobile users, improving data consistency and user experience. ref: https://discuss.logseq.com/t/logseq-mobile-sync-in-background/17214 Signed-off-by: Avelino <31996+avelino@users.noreply.github.com>
…emSynchronizedGroupsEnabled to true in the preferences. Signed-off-by: Avelino <31996+avelino@users.noreply.github.com>
- Added iOS background task registration and scheduling in AppDelegate.swift using BGTaskScheduler. - Integrated background sync trigger via JavaScript bridge to webview. - Ensured background sync is scheduled on app launch and when entering background. - Updated Info.plist to support background tasks and required capabilities. - Exposed background sync trigger to JS global in sync_background.cljs for iOS bridge. - This enables Logseq mobile to sync notes in the background, improving reliability and user experience. Signed-off-by: Avelino <31996+avelino@users.noreply.github.com>
- Add RECEIVE_BOOT_COMPLETED permission to AndroidManifest.xml - Add MobileSyncService and MobileSyncBootReceiver for background sync - Update MainActivity to support background sync triggers - Enables background sync to run periodically and after device boot Signed-off-by: Avelino <31996+avelino@users.noreply.github.com>
|
@tiensonqin and @logseq-cldwalker see if this implementation makes sense for logseq's future |
|
it will make my life better on the mobile app |
|
@logseq-cldwalker @tiensonqin any updates here? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
frontend.mobile.sync-backgroundnamespace to manage cloud sync when the mobile app is backgrounded.This enables reliable background syncing for mobile users, improving data consistency and user experience.
ref: https://discuss.logseq.com/t/logseq-mobile-sync-in-background/17214