I'm developing an application that draws polygons on the screen from information received via bluetooth.
I receive latitude and longitude information, and from other information coming from sensors, and based on that I draw polygons or points on the screen.
However, there are situations where a very high number of polygons are rendered on the screen, and memory usage increasing untill app crashes, same problem here .
Is there any way to display on screen (render on screen) only the polygons, or points that are within a radius based on the current location?
I researched about KmlContainer, but I don't know if it would solve the problem.
Could this issue be related to the processing of the hardware the application is being tested on?
Any solution or tip to solve would be great.
Thanks in advance!
Can you use the android memory profiler in Android Studio and see which objects are holding the most memory. You might get some hints.
Specifically you can view allocations as specified here,