> For the complete documentation index, see [llms.txt](https://docs.movesdk.com/move-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.movesdk.com/move-platform/~/changes/1lLi1pFRKkteajbXv0hC/sdk/getting-started/android/quick-start.md).

# Quick Start

Getting Started / Android

## Setup the MOVE SDK

The Android MOVE SDK must be initialized by adding MoveSdk.init() at the first line in your Android Application class (onCreate). This instance can then be used to control MOVE SDK services. Check [API Interface](/move-platform/~/changes/1lLi1pFRKkteajbXv0hC/sdk/api-interface.md) for more details.

After the MOVE SDK has been initialized you also want to add notifications, listeners or activate additional features.

Also you have to configure the MOVE SDK before you are able to call .setup(...).

{% hint style="warning" %}
In order to successfully initialize and run the MOVE SDK, the user's [MoveAuth ](/move-platform/~/changes/1lLi1pFRKkteajbXv0hC/sdk/models/moveauth.md)must already be fetched ([see also here](/move-platform/~/changes/1lLi1pFRKkteajbXv0hC/backend/getting-started-with-the-dolphin-move-timeline-service.md#register-user)), and the required [permissions ](/move-platform/~/changes/1lLi1pFRKkteajbXv0hC/sdk/appendix/android/permission-handling.md)must be granted. If the provided [MoveAuth ](/move-platform/~/changes/1lLi1pFRKkteajbXv0hC/sdk/models/moveauth.md)is invalid, the MOVE SDK will not initialize. If the required permissions are missing, the MOVE SDK will initialize but go into missing permission error [State](/move-platform/~/changes/1lLi1pFRKkteajbXv0hC/sdk/models/movestate.md).
{% endhint %}

The initialization of the MOVE SDK is asynchronous and you will be notified regarding state changes with the [MoveStateListener](https://docs.movesdk.com/move-platform/~/changes/1lLi1pFRKkteajbXv0hC/sdk/getting-started/android/pages/-MZIfp4AHvpUSOaycA60#DolphinSdk.Builderv1.1-sdkstatelistenerSdkstatelistener). On successful initialization the [MoveSdkState](/move-platform/~/changes/1lLi1pFRKkteajbXv0hC/sdk/models/movestate.md) changes to `READY`.&#x20;

To be able to use the MOVE SDK, several permission need to be granted. This is described in [Permission Handling](/move-platform/~/changes/1lLi1pFRKkteajbXv0hC/sdk/appendix/android/permission-handling.md).

Now that there is an instance of the MOVE SDK, the detection may be started with [startAutomaticDetection()](/move-platform/~/changes/1lLi1pFRKkteajbXv0hC/sdk/api-interface/android-1/android.md#start-automatic-detection), which should lead to an `RUNNING` state of the MOVE SDK.

{% hint style="warning" %}
The MOVE SDK is collecting data only when in`RUNNING`state.
{% endhint %}

### Code example

```kotlin
// in your application class

override fun onCreate() {
   // init the MOVE SDK
   val moveSdk = MoveSdk.init(this)   
   
   super.onCreate()

   // Example of adding some notifications, register listener
   // and activate MOVE SDK features.
   moveSdk.apply {
     recognitionNotification(recognitionNotification)
     tripNotification(drivingNotification)
     sdkStateListener(sdkStateListener)
     tripStateListener(tripStateListener)
     authStateUpdateListener(authStateListener)
     initializationListener(initListener)
     initiateAssistanceCall(assistanceListener)
     consoleLogging(true)
   }
   
   ...
   
   // Configuration of the MOVE SDK
   val moveServices: MutableSet<MoveDetectionService> = mutableSetOf()
   
   val drivingServices: MutableSet<DrivingService> = mutableSetOf()
   drivingServices.add(DrivingService.DrivingBehaviour)
   drivingServices.add(DrivingService.DistractionFreeDriving)

   val walkingServices: MutableSet<WalkingService> = mutableSetOf()
   walkingServices.add(WalkingService.Location)

   moveServices.add(MoveDetectionService.Driving(drivingServices = drivingServices.toList()))
   moveServices.add(MoveDetectionService.Walking(walkingServices = walkingServices.toList()))
   moveServices.add(MoveDetectionService.Cycling)
   moveServices.add(MoveDetectionService.AutomaticImpactDetection)
   moveServices.add(MoveDetectionService.AssistanceCall)
   
   val moveConfig = MoveConfig(moveDetectionServices = moveServices.toList())
   
   ...
   
   MoveAuth(
            projectId =  projectId ?: 0L,
            userId = userId ?: "",
            accessToken = accessToken ?: "",
            refreshToken = refreshToken ?: ""
        )
   
   ...
   
   moveSdk.setup(
           auth = auth,
           config = moveConfig,
           start = false,
           motionPermissionRequired = true
   )   
   
}
```

{% hint style="info" %}
You need to replace **projectId, userId**, **accessToken,** and **refreshToken** with your own values.
{% endhint %}
