Files
sharedinbox/test
Thomas SharedInboxandClaude Sonnet 4.6 5b93a59537 fix: survive permanently broken path_provider channel on Android (#192)
Two changes prevent the crash reported on Samsung S1RXS32.50-13-25:

1. Add WidgetsFlutterBinding.ensureInitialized() to callbackDispatcher so
   that Flutter platform channels (including path_provider) are available
   when WorkManager triggers background sync.  Without it the channel is
   permanently unavailable in that isolate regardless of how long we wait.

2. Add an Android-specific fallback in _resolveDatabasePath: after all
   back-off retries fail, derive the app files-dir path from
   /proc/self/cmdline (the Android process name equals the package name)
   without a platform channel.  This lets the database open on devices
   where path_provider is broken even in the main isolate.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 03:41:12 +02:00
..