Components
LazyMoveSdk
Since MOVE SDK v2.7.0
Due to the fact that the application using MOVE SDK will be launched in the background in case of trip detection, all components and all functionality of the application will start working in normal mode, this consumes the memory of the device. The device's operating system may close applications that are running in the background to save memory, and if this happens to the application that is recording the trip, it will negatively affect the result of the trip recording.
The LazyMoveSdk wrapper component is designed to minimise the memory usage of the device. This component monitors AppState and MoveTripState. LazyMoveSdk will remove it's children in one of the cases:
the app was started in the background
the app is in the background and MoveTripState is
'DRIVING'
, after some delay (delayToRemoveUiInBackgroundMs)
When AppState changes back to 'active', LazyMoveSdk will render it's children again, if they were removed.
delayToRemoveUiInBackgroundMs
30000
If the app was in the background and a trip is started - after this delay, the LazyMoveSdk children will be removed.
Please note, that LazyMoveSdk removes it's children. If you have some important logic (for example requests) inside of any child component, it will not be executed.
Usage example
You can also wrap not the entire application code, but only the part that uses the most memory (like maps, charts, etc.).
Last updated