I am getting some data from the Realtime Database for Android. Sometimes I got a crash with this message:
java.lang.RuntimeException: Firebase Database encountered an OutOfMemoryError. You may need to reduce the amount of data you are syncing to the client (e.g. by using queries or syncing a deeper path). `
The problems here are:
- I am not sure what data and what call to make that exception to optimize it. How to find the call or portion of the data that must be optimized?
- The second problem is that this crash happens not on all devices + it does not happen all the time.
Could you give me any suggestions on fixing that?