stream-log
stream-log copied to clipboard
Fix Android file logger and ForegroundService crash
🎯 Goal
Fixes the following issues with stream-log-android-file
- Fix ForegroundService crash caused by insufficient permissions and lack of foregroundSerivceType on newer Android SDK
- Fix issue with FileStreamLogger where the log file is never opened because of an already existing file in the filesystem
🛠Implementation details
- Update AndroidManifest service declaration to include foregroundServiceType with dataSync type
- Update AndroidManifest to include the FOREGROUND_SERVICE_DATA_SYNC permission
- Update FileStreamLogger to open/write to existing log file if one already exists and create one if it doesn't