Skip to main content
Skip table of contents

VMSMobileSDK initialization

Main entry point to establish connection between application and server.

Initialization

For simple initialization you must set 3 required params to 'VMSMobileSDK.Builder':

  • application: Application - import android.app.*

  • baseUrl: String - url of your server

  • uuid: String - uuid of your server

KOTLIN
import VMSMobileSDK

VMSMobileSDK.Builder(
                application: Application,
                baseUrl: String,
                uuid: String,
                language: VMSLanguage,
            ).apply {
                 // If you have access token 
                 if (your_user_token.isNotEmpty()) {
                     VMSMobileSDK.userToken = your_user_token
                 }
             }

Language

For now we support only two languages

KOTLIN
enum class VMSLanguage(val language: String) {
	ENGLISH("en"),
	RUSSIAN("ru");
}

Access token

For authorised user you can set user's access token. You must set access token after successful login to use it in other requests. Set 'userToken' from 'VMSMobileSDK':

KOTLIN
VMSMobileSDK.userToken = your_user_token

We support only 3 requests without tokens:

  • getTranslations();

  • getStatics();

  • getStaticBasic();

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.