# Sample Projects Source: https://www.nianticspatial.com/docs/nsdk/sample_projects/?platform=kotlin # Kotlin Sample Projects | | The NSDK Kotlin samples are designed to demonstrate the uses of each feature in our SDK. The sample project launches multiple small samples that you can try out and look though the code to learn how to get started with any feature. | | --- | --- | ## Installing the Samples Clone the [Kotlin samples](https://github.com/nianticspatial/nsdk-samples-kotlin) repository: ```bash git clone https://github.com/nianticspatial/nsdk-samples-kotlin.git ``` Alternatively, select **Code > Download ZIP** on GitHub, then extract the ZIP. The Android Studio project is nested inside the downloaded repository: ```text nsdk-samples-kotlin/ └── NsdkSamples/ <- Open this directory in Android Studio ├── settings.gradle.kts ├── gradlew └── NsdkSamples/ <- Application module; do not open this directory by itself ``` Open and run the samples as follows: 1. Launch Android Studio and select **File > Open**. 2. Select `/nsdk-samples-kotlin/NsdkSamples`, the directory containing `settings.gradle.kts` and `gradlew`, then select **Open**. 3. If prompted, select **Trust Project**. 4. Wait for Gradle sync and indexing to finish. If sync does not start automatically, select **File > Sync Project with Gradle Files**. 5. Connect an ARCore-compatible Android device with USB debugging enabled and select it in the target-device menu. 6. Select the `NsdkSamples` run configuration, then select **Run**. 7. On the device, grant the requested camera and location permissions and complete the sample app's sign-in flow. 8. Select a feature, such as **Capture**, from the sample list. > **Info:** > > **Authentication** > > The sample app uses authenticated sessions to access your organization's data from Niantic's backend services. For more information, see the [Auth guide](https://www.nianticspatial.com/docs/nsdk/auth_getting_started/). ## Samples ### VPS2 | | **Attention**This sample requires [Auth Login](./auth_getting_started.md)).This sample shows a list of sites in the selected Organization and allows you to choose a VPS Asset from the Sites API as a localization target, then interfaces with your phone's map to guide you to it.To use this sample:Build to your device and open the app. Make sure to allow location and camera permissions.Choose an Organization where the site you're looking for is.Choose the site you'll want to localize to.Tap the Localize Anchor buttonPhysically visit the location and point the camera at the scaned location. A red arrow will appear pointing you in the general direction.Wait for the status to change to **Tracking**.A 3d mesh of the scan should appear on top of the real world location as well as a map showing your phone's position. | | --- | --- | ### World Pose | | This sample demonstrates the World Positioning System's accuracy. As you turn and move around you will see the trasking precision in the map preview screen. As you walk around, World Pose should stabilize and become more accurate over time. | | --- | --- | ### Depth | | This sample demonstrates how to get the depth buffer and display it as an overlay in the scene. | | --- | --- | ### Scene Segmentation | | This sample runs scene segmentation, streams the selected channel's confidence map, and draws a pink/blue overlay that you can fade using the transparency slider. The dropdown lists every semantic channel reported by NSDK.To use this sample:Launch the Kotlin samples app and open **Semantics** from the list.Wait for the status card to report that channels are streaming, then pick a semantic label from the dropdown.Adjust the transparency slider or tap **Hide Overlay** to compare the filtered view with the raw camera feed. | | --- | --- | ### Capture | | This sample allows you to capture a real-world location for playback. To use this sample:Press **Start capture** in the space you would like to create the dataset.Walk through the scene as normal.Press **Stop capture** when done.Press **Export** to obtain a file that can be used for playback. | | --- | --- | ### Sites | | The Sites feature provides access to organized entity data in the Niantic Spatial platform, enabling your application to discover and navigate the relationships between a user, organization, site, and spatial data asset. This feature allows you to query what spatial content is available to users and how it's structured within your organization. | | --- | --- | ### Auth | | This sample demonstrates different methods of authentication and authorization when working with NSDK.There are two options:A developer login that provides full access to all features.Connection to a sample Enterprise backend where the user is anonymized. | | --- | --- |