Implement background sync for xmr using flutter_daemon (#2094)

* Implement background sync for xmr using flutter_daemon

* - initialize app config in background thread
- initializeAppConfigs without loading the wallet.

* - properly do awaited calls in methodChannel
- prevent locking main thread during background sync

* add back background sync debug page
fix issues caused by xmr wallet being view only (and read only)

* changes from review
improve starting of bgsync task

* update stopBackgroundSync, await listener functions, ensure that listener always start (call _start in constructor)

* DO-NOT-MERGE: extre verbose monero logs

* stop background service when app is being opened

* improve monitoring of background sync

* update flutter_daemon to ensure network constraint
prevent throwing errors on isBackgroundSyncEnabled
check network before syncing

* Update lib/main.dart

* revert Update main.dart [skip ci]

* continously run network check

* disable charging requirement,
fix status reporting of background sync in UI

* Refactor background sync logic, and add UI notifications for battery optimization. Updated flutter_daemon version modified build.gradle for signing config to allow testing in both release and debug modes.

* verbose monero only when requested in code.
Do not start background sync when battery optimization is on

* fix background sync mode not properly reflecting state changes

* drop unnecessary dependency

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
cyan 2025-03-21 18:22:00 +01:00 committed by GitHub
parent d44621e6c7
commit 686580ff78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
60 changed files with 853 additions and 352 deletions

View file

@ -69,6 +69,7 @@
"avg_savings": "Matsakaici Adana",
"awaitDAppProcessing": "Da fatan za a jira dApp ya gama aiki.",
"awaiting_payment_confirmation": "Ana jiran Tabbacin Biyan Kuɗi",
"background_sync": "Tunawa da Setc",
"background_sync_mode": "Yanayin Sync",
"backup": "Ajiyayyen",
"backup_file": "Ajiyayyen fayil",
@ -924,6 +925,8 @@
"understand": "na gane",
"unlock": "Buɗe",
"unmatched_currencies": "Nau'in walat ɗin ku na yanzu bai dace da na lambar QR da aka bincika ba",
"unrestricted_background_service": "Sabis na baya",
"unrestricted_background_service_notice": "Don ba da damar Sync na asali kuna buƙatar kunna sabis na baya da ba a santa ba",
"unspent_change": "Canza",
"unspent_coins_details_title": "Bayanan tsabar kudi da ba a kashe ba",
"unspent_coins_title": "Tsabar da ba a kashe ba",