This repository provides a bare-bones example of how to build a Third-Party App (TPA) for AugmentOS, the operating system for smart glasses. If you want to get started with building apps for AugmentOS, start here.
If you just want to dive in:
- Clone this repo.
- Install AugmentOSLib
- Build and deploy the app to your AugmentOS Puck or other device running AugmentOS Core.
You're now running an AugmentOS TPA!
If you want to start from scratch:
- Start a fresh Android Studio Project.
- Install AugmentOSLib
- Add the following to your app's
AndroidManifest.xml
file:
<service android:name="com.yourpackage.YourAugmentosService"
android:exported="true">
<!-- Intent filter required to communicate with AugmentOS -->
<intent-filter>
<action android:name="AUGMENTOS_INTENT" />
</intent-filter>
<!-- Metadata marking this app as a TPA -->
<meta-data android:name="com.augmentos.tpa.name" android:value="Example App" />
<meta-data android:name="com.augmentos.tpa.description" android:value="Example App Description" />
</service>
- Build and deploy the app to your AugmentOS Puck or other device running AugmentOS Core.
You're now running an AugmentOS TPA!
-
Clone the AugmentOS repository next to your app's directory (default setup)
-
If you cloned the AugmentOS repository elsewhere, update the path to AugmentOSLib in
settings.gradle
:project(':AugmentOSLib').projectDir = new File(rootProject.projectDir, '../AugmentOS/augmentos_android_library/AugmentOSLib')
- The core of this app is a foreground service (
ExampleAugmentosAppService
) that extendsSmartGlassesAndroidService
. - This service allows the app to:
- Communicate with the AugmentOS Core.
- Subscribe to data streams like transcription.
- Display content directly on the smart glasses.
- The library exposes essential methods to interact with AugmentOS, such as:
- Registering the app with AugmentOS.
augmentOSLib.registerApp("Example App", "Bare-bones AugmentOS app.");
- Subscribing to data streams, like real-time transcription.
augmentOSLib.subscribe(DataStreamType.TRANSCRIPTION_ENGLISH_STREAM, this::processTranscriptionCallback);
- Displaying content on the smart glasses:
- Reference cards:
augmentOSLib.sendReferenceCard("Title", "Body text.");
- Bullet point lists:
augmentOSLib.sendBulletPointList("Title", new String[] {"Point 1", "Point 2"});
- Text layouts:
- Centered text:
augmentOSLib.sendCenteredText("Centered Text Example");
- Text wall:
augmentOSLib.sendTextWall("This is a block of text that fills the screen.");
- Double text wall:
augmentOSLib.sendDoubleTextWall("Top Text", "Bottom Text");
- Centered text:
- Row cards:
augmentOSLib.sendRowsCard(new String[] {"Row 1", "Row 2", "Row 3"});
- Bitmap images:
augmentOSLib.sendBitmap(myBitmap);
- (COMING SOON) Custom layouts via JSON:
augmentOSLib.sendCustomContent("{ \"custom\": \"layout\" }");
- Reference cards:
- Registering the app with AugmentOS.
- The app can subscribe to a variety of data streams and handle the incoming events:
- Real-Time Transcription:
augmentOSLib.subscribe(DataStreamType.TRANSCRIPTION_ENGLISH_STREAM, ::transcriptCallback);
- Smart Ring Button Events:
augmentOSLib.subscribe(DataStreamType.SMART_RING_BUTTON,::buttonCallback);
- Glasses Side Tap Events:
augmentOSLib.subscribe(DataStreamType.GLASSES_SIDE_TAP, ::tapCallback);
- Real-Time Transcription:
This project is licensed under the MIT License. See the LICENSE
file for more details.