I periodically append logcat info to a file on my SD card, but it seems like it does not write anything to the file while the phone is in sleep mode.
I use PARTIAL_WAKE_LOCK to keep the cpu running.
Is it possible to write to a file on the SD card while the phone is in sleep mode (with a wake lock though) and if so, what am I missing?
Can add the code if wanted, but it doesn’t seem relevant since it has already proven to work while the phone is on.
How are you getting notifications of when to write the log? If you are using Handler it doesn’t work when the phone is in sleep mode. Use the AlarmManager service instead, it will work even if the phone is in sleep mode (and you won’t have to worry about wake locks and potentially burning battery by keeping the phone out of sleep mode.)