Hi Community, 👋
We're experiencing an ANR and subsequent crash in our Android app, which appears to be triggered by a call to the geometry editor function insertVertex when we try to add a point during live location updates. In our use case, users could be driving, and their location is updated every 3 meters. Since we can't know how fast a user might be moving, we end up with many frequent location updates—each one triggering a call to insertVertex, which we suspect may be blocking the main thread and causing the ANR.
Has anyone encountered similar issues with geometry editor during frequent live location updates? Are there best practices or recommended approaches for handling high-frequency vertex insertion without risking UI freezes or crashes?
Any advice or suggestions would be greatly appreciated!
Thanks in advance!
SDK Version: 200.7.0
How many vertices does your resulting geometry have?
The geometry editor supports editing a geometry with a few thousand vertices, but the performance decreases when the number of vertices increases.
Your issue might be that you are trying to insert vertices faster than the editor can process them.
To ensure stability and maintain acceptable performance, you might limit the rate of vertex insertion by implementing a 1-second cooldown/timer between insertions.
Is limiting the vertex insertion frequency to approximately one per second an acceptable constraint for your specific use case?