All articles
Developer
September 30, 20267 min read

How to Build an Android App for Smart Glasses

Apps for the Neuraglass Dev Kit are ordinary Android apps. The project setup, the five keys, the camera, and the design rules for a see-through display.

If you have built an Android app, you can build a smart glasses app. The Neuraglass Dev Kit runs Stack OS, which is built on AOSP. Apps are ordinary APKs written in Java or Kotlin, built with Gradle, and installed with ADB. Only two things really change: how people give input, and what the screen is.

This guide gets a first app running on the glasses. The code is the same as in the SDK docs.

What's different from a phone app

PhoneNeuraglass Dev Kit
InputTouchscreenFive physical keys and voice
ScreenOpaque, in your handSee-through Micro OLED, 640 × 400, 26° field of view
CameraPoints wherever you hold it16MP, sees what the wearer sees
AudioSpeaker or earbudsBuilt-in speakers and microphone
InstallPlay StoreAPK over ADB, USB or Wi-Fi

Everything else works the way you already know: Activities, layouts, permissions, CameraX, TextToSpeech.

1. Set up the project

Create a normal Android project in Android Studio and set these SDK levels:

android {
    compileSdk 33
    defaultConfig {
        applicationId "com.example.helloneuraglass"
        minSdk 21
        targetSdk 33
    }
}
dependencies {
    implementation "androidx.appcompat:appcompat:1.6.1"
}

Java and Kotlin both work. Views or Compose are both fine. Keep it light, because the screen is small and the processor is a mobile chip (Unisoc W517), not a flagship phone.

2. Handle the five keys

There's no touchscreen, so all input comes through dispatchKeyEvent. The Dev Kit has five physical keys:

KeyNameCode
Scroll forwardKEY_RIGHT106
Scroll backwardKEY_LEFT105
ConfirmKEY_OK352
ReturnKEY_BACK158
PowerPOWER164

Consume ACTION_DOWN for these codes. Scroll moves focus between items; it is not a mouse pointer. Confirm selects. Return goes back.

public class MainActivity extends AppCompatActivity {
    public static final int KEY_OK   = 352;
    public static final int KEY_BACK = 158;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TextView text = new TextView(this);
        text.setText("Hello from Neuraglass.\nConfirm to continue.");
        text.setTextSize(18f);
        text.setPadding(48, 48, 48, 48);
        setContentView(text);
    }
    @Override
    public boolean dispatchKeyEvent(KeyEvent event) {
        if (event.getAction() == KeyEvent.ACTION_DOWN) {
            switch (event.getKeyCode()) {
                case KEY_OK:
                    Toast.makeText(this, "Confirm", Toast.LENGTH_SHORT).show();
                    return true;
                case KEY_BACK:
                    finish();
                    return true;
            }
        }
        return super.dispatchKeyEvent(event);
    }
}

3. Install it on the glasses

The glasses show up as a normal Android device over USB or Wi-Fi.

adb install -r app/build/outputs/apk/debug/app-debug.apk
adb logcat

4. Use the camera

The camera is standard CameraX. Add the dependencies and request the CAMERA permission in your manifest:

implementation "androidx.camera:camera-core:1.3.0"
implementation "androidx.camera:camera-camera2:1.3.0"
implementation "androidx.camera:camera-lifecycle:1.3.0"
implementation "androidx.camera:camera-view:1.3.0"

This is where glasses beat phones. The camera sits on the frame, so it sees what the wearer is looking at. Nobody has to pull out a phone and point it. An app can react to the scene while the user's hands are busy.

5. Talk back through the speakers

Use TextToSpeech as usual and route audio to the built-in speakers. For the microphone, use MediaRecorder or AudioRecord.

AudioManager audio = (AudioManager) getSystemService(AUDIO_SERVICE);
audio.setSpeakerphoneOn(true);
tts.speak("Next step: preheat the oven", TextToSpeech.QUEUE_FLUSH, null, "step");

Designing for a see-through display

This is the part people get wrong. The wearer is looking through your UI at the real world, often while walking or talking to someone.

  • Dark background, light or cyan text. On a see-through display, dark areas let the world show through. A big bright panel blocks the view.
  • One action per screen. Three keys to navigate means menus have to be short.
  • A few words, not paragraphs. If someone has to stop and read, the design has failed.
  • No phone patterns. Floating buttons, nav drawers, multi-step forms, and tiny labels don't work here.
  • Don't require a phone. Core features should work on the glasses alone.

What isn't available yet

Helix (the agent) and Eliza (the voice assistant) are part of Stack OS, but they don't have public APIs yet. Don't build against them. The camera, microphone, speakers, display, and keys all use standard Android APIs today.

Using Claude Code or Codex

Coding agents like to invent a smart glasses SDK that doesn't exist. To stop that, put CLAUDE.md (Claude Code) or AGENTS.md (Codex, Cursor) in your project root. They give the agent the key codes, SDK levels, and UI rules above.

First apps that fit the hardware

These only use APIs that exist today:

  • Teleprompter. Show a script one line at a time and step through it with the scroll keys. You keep eye contact with your audience.
  • Live captions. Mic audio into the speech-to-text library you already use, then one line of text on the display.
  • Hands-free checklist. A recipe, a repair procedure, or a pre-flight check, advanced with Confirm.
  • Ask about what you're looking at. Capture a frame with CameraX, send it to the vision model you already use, and show a short answer.

The full reference, including the manifest, key handling, camera, and audio examples, is on the SDK page.

Neuraglass Dev Kit

Glasses with a see-through display.

Translation, Eliza, Helix, and the app builder on Stack OS. $849, ships in 2-3 weeks.

Buy now $849