Linked Questions

Popular Questions

Android crashes because of the heap (probably)

Asked by At

Because of NDA I cannot post any code.

We have this app build with react native and expo and the biggest issue is that after downloading big amount of data it crashes. Even during the download.

What happens during the download is that REST request through axios middleware in redux saves data in SQLite from expo. All data are paged. We work with big amount of data (over 60MB). Problem is that even after paging of the requests some android devices crash during the download.

It is not consistent with android version at all (in some cases we have 8+ in some 5+ and it works).

On almost all devices we have manufacturer Samsung and RAM is usually 3GB.

After downloading of big amount of data we use Expo.Uploads.reload.

Just to force clearing of the memory.

Still in some cases (e.g. Samsung tablet 3GB RAM - even after clearing all of the resources from settings - free memory over 1.5GB) it crashes during the download.

Any ideas how to solve this?


Related Questions