stream-log icon indicating copy to clipboard operation
stream-log copied to clipboard

Fix Android file logger and ForegroundService crash

Open SeanReg opened this issue 3 months ago • 0 comments

🎯 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

SeanReg avatar Sep 30 '25 04:09 SeanReg