Setup
Configure your app and establish your first connection with VIVE AI Glasses.
Overview
Before you can communicate with VIVE AI Glasses, you need to configure your app’s permissions and initialize the SDK.
Step 1: Register the application
You must register your app to enable communication between the software and hardware.
Step 2: Request permissions
Microphone and camera permissions are essential for interactive features and ensure that the hardware functions correctly while protecting user privacy.
- Microphone access enables the app to capture voice input for speech-to-text conversion or real-time audio streaming.
- Camera access allows the app to capture photos and stream live video.
Step 3: Initialize the SDK
-
Instantiate the SDK and set up the adapter
Create an instance of the ViveGlass and then assign a ViveGlassKit as the adapter. -
Establish the connection
The connect() method starts the connection process and sets up a callback listener
(ViveGlassClientCallback) to handle events.
private void initViveGlassSDK() {
val viveGlass = ViveGlass()
val viveGlassKit = ViveGlassKit(applicationContext)
ViveGlass.adapter = viveGlassKit
viveGlass.connect(new ViveGlassClientCallback() {
@Override
public void onConnectionStateChanged(ConnectionState connectionState) {
}
@Override
public void onImageCaptured(CaptureEvent captureEvent, ImagePayload imagePayload) {
}
@Override
public void onSpeechTranscribed(TranscribedEvent transcribedEvent, String text) {
}
@Override
public void onTextSpoken(SynthesisEvent synthesisEvent) {
}
@Override
public void onKeyEvent(KeyEvent keyEvent) {
}
});
}