SDK Initialization States¶
It is important to understand the difference between SDK states and content.
SDK is our engine, it needs to be started for SDK to work. There is some required content (for configuration) that SDK needs to start. For Web, this is provided in the initial configuration. For Mobile, this is provided via PointrContent.zip
file.
On the other hand, most content (including maps, POIs, pathfinding graph, etc.) are not required for SDK to start. These are downloaded as and when needed. In addition, for a multi-site deployment, it wouldn’t make sense to download content for all sites while starting SDK.
Therefore, SDK states and content are designed to be independent. SDK can be started (and reach STARTED
state) without content. This may cause confusion for some developers as they expect everything to be ready once they see the STARTED
SDK state. As explained in this section, SDK could be started but SDK might still need to download content before showing a map or enabling pathfinding.
Available States¶
Mobile SDK goes through the following states during initialization:
Pointr state | Description |
---|---|
Off | SDK is not running |
Configuring | SDK is configuring before running. During initialization, SDK first goes from Off to Configuring state. |
Validating | Validating license with the server for authentic use. |
Registering | Registering the device with the server. Under normal circumstances, this state should only be encountered upon first run. |
Running | SDK is running, having successfully configured itself, validated its license and registered the device with the server. |
Failed Validation | SDK is not running because it failed the validation step |
Failed Registration | SDK is not running because it failed the registration step |
Failde No Internet | SDK is not running because it couldn’t validate or register due to no internet connection |