Before using any class from the MDK, the first step is to call the function GiPStech.init. This function requires the GiPStech development key, which is linked to the package name (Android) and/or the bundle identifier (iOS) of the app. To obtain a development key, please contact GiPStech (si apre in una nuova scheda). Additionally, for the Android operating system, an Android Context is required.
If needed, login credentials can be provided by calling the function GiPStech.setUser, granting access to the user’s buildings. Ideally, this function should be called before the init function, but it can also be invoked afterward, in which case the MDK will repeat the authentication process. However, this approach is generally discouraged, as credentials should remain confidential and be managed by the building owner. Instead, to grant an app access to a specific building, the building must be linked to the app’s development key through the GiPStech Map Manager (si apre in una nuova scheda).
Activation
Sezione intitolata “Activation”The MDK operates without requiring an internet connection, allowing the location system to function even when the device is offline.
However, internet access is necessary for downloading map data, configurations, and activating the library, along with other features included in the license linked to the development key. The activation is typically valid for one month and is automatically renewed whenever an internet connection is available.
App version
Sezione intitolata “App version”You can optionally send your app version to the GiPStech server using GiPStech.setAppVersion. This call must be made before initialization.
This enables GiPStech to identify the version of the app in use and, if necessary, revoke the license for outdated versions when misuse or security issues are detected.
Using this function is highly recommended.
Releasing resources
Sezione intitolata “Releasing resources”To free all resources, call the function GiPStech.shutdown. This should be done when the application is closing or when GiPStech services are no longer needed.
Best Practice
Sezione intitolata “Best Practice”The recommended approach is to call GiPStech.init when the application starts and GiPStech.shutdown just before the application is destroyed.
Example
Sezione intitolata “Example”The following code calls the init and shutdown functions
GiPStech.init( devKey = "your_dev_key", context = context)
...
GiPStech.shutdown()