---
source_path: "api/sample/android/index.md"
canonical_url: "https://doc.sensory.com/tnl/7.8/api/sample/android/"
---

# Android examples

The Android sample programs and code snippets are available in _sample/android/_ in the
TrulyNatural installation directory.

See _~/Sensory/TrulyNaturalSDK/7.9.0-pre.0/sample/android/_

The samples are written in Java; the same `@aar` and APIs work
unchanged from [Kotlin][] (see
[API overview § Kotlin on Android](https://doc.sensory.com/tnl/7.8/api/overview.md#kotlin-on-android) for interop notes).

New to the Session API? Start with
[Your first program](https://doc.sensory.com/tnl/7.8/getting-started/your-first-program.md#your-first-program)
for the Android wake-word flow, then explore the samples below.

## Examples
[enroll-trigger](https://doc.sensory.com/tnl/7.8/api/sample/android/enroll-trigger.md#enroll-trigger)

- UDT enrollment and phrase spotting.

[snsr-debug](https://doc.sensory.com/tnl/7.8/api/sample/android/snsr-debug.md#snsr-debug)

- Logs recognizer audio and event timing information using the [tpl-spot-debug](https://doc.sensory.com/tnl/7.8/models/index.md#tpl-spot-debug) template.

[SnsrStreamAudioDeviceAndroid.java](https://doc.sensory.com/tnl/7.8/api/sample/android/SnsrStreamAudioDeviceAndroid.md#snsrstreamaudiodeviceandroidjava)

- Source for the [fromAudioDevice](https://doc.sensory.com/tnl/7.8/api/io.md#fromaudiodevice) implementation for [Android Audio][AudioRecord].

<!-- Reference definitions from includes/links.md -->
[AudioRecord]: https://developer.android.com/reference/android/media/AudioRecord "Android AudioRecord class"
[Kotlin]: https://kotlinlang.org/ "Kotlin programming language"

<!-- Abbreviation definitions from includes/abbreviations.md -->
*[API]: Application Programming Interface
*[TNL]: TrulyNatural, Sensory's large-vocabulary speech recognition technology
*[UDT]: User-Defined Trigger: enrolled wake words and command sets
