I made a application that runs on a coffee machine.
After 20+ days (can be 60+ days depending on use)
an OutOfMemoryError occurs:
java.lang.OutOfMemoryError: Failed to allocate a 604 byte allocation with 16777216 free bytes and 319MB until OOM; failed due to fragmentation (required continguous free 65536 bytes for a new buffer where largest contiguous free 53248 bytes)
My question is:
Is there a way to run a defragmentation on memory android application programmatically?
The time it takes should not be a issue because machine goes into standby or eco mode.
And what I see is that there is more than enough memory available.