Apps

What is Kotlin (Android)

What it is

The main language of Android apps. A native Kotlin app runs faster and more reliably than a "wrapper" around a website and has access to all the phone hardware.

How we use it

The OshaPlay audio player with USB DAC output and the OshaVPN client are written in Kotlin. Builds are signed and update over the air.

Where a native app helps a business

  • You need access to the phone's hardware: a USB device, the system VPN, background work a website cannot do.
  • The app has to run in the background for hours: playing music, holding a tunnel, sending reports.
  • The user needs one button, while the app handles everything complicated by itself.
  • The app is handed out to your own people by link, without a store, and updates itself.

How we use it

  • OshaPlay is an audio player for Android 12 and newer. It claims a USB DAC itself through the USB Host API and delivers tracks bit for bit, bypassing the system mixer, which otherwise resamples any audio to 48 kHz. The UI is Jetpack Compose, playback runs on Media3, and the DAC stream and resampler are in C++. The fake Hi-Res check builds a spectrum right in Kotlin.
  • OshaVPN is a VPN client for Android 10 and newer with a single Connect button. Both VPN engines are built into one library, the entry point is chosen by a race, and local sites go direct. An "Almost ready" screen collects the required permissions, and the main screen reminds the user to switch on the system always-on VPN.

Both apps install from an APK and update over the air. Development is under Android and Windows apps.

Common problems

  • The manufacturer's shell puts the app to sleep. On Huawei, audio stuttered with the screen off: the EMUI shell froze the player for seconds. We found it from phone reports, set the audio queue back to 0.4 s and added "EMUI app launch" and "Battery saver" buttons with an explanation to the settings.
  • An emulator is not a phone. Direct DAC output was tested in the emulator only for the "no DAC" case; real operation is visible through reports from the client's phone. That is why test builds and logs are collected from real devices.
  • The Android version limits what is possible. Built-in bit-perfect USB output appeared only in Android 14, so on Android 12 we had to write it ourselves.
  • Permissions. Without the right permissions, background work and the VPN silently fail, so the app walks the user through them.

When you do not need it

If the job is to show a catalogue, take a request or give customers an account, a website or a Telegram Mini App is enough: nothing to install or update. A native app pays off where hardware, background work or system phone features are needed.

โ† All terms

Need a website, a bot or automation?

Terms explained โ€” now let's get to work: tell us about the task and we'll turn it into a clear work plan.