@glassly/bluetooth-sdk 0.1.0-dev.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +563 -0
- package/android/build.gradle +450 -0
- package/android/gradle.properties.example +9 -0
- package/android/lc3Lib/CMakeLists.txt +6 -0
- package/android/lc3Lib/build.gradle +212 -0
- package/android/lc3Lib/proguard-rules.pro +33 -0
- package/android/lc3Lib/src/main/AndroidManifest.xml +2 -0
- package/android/lc3Lib/src/main/cpp/CMakeLists.txt +8 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/CMakeLists.txt +30 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/jni/CMakeLists.txt +7 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/jni/ogg_opus_encoder.cc +96 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/jni/ogg_opus_encoder.h +53 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/Makefile.am +6 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/config_types.h +26 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/config_types.h.in +26 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/ogg.h +209 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libogg/os_types.h +158 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus.h +981 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_custom.h +342 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_defines.h +799 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_multistream.h +660 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_projection.h +568 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/libopus/opus_types.h +166 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/ogg_opus_encoder.cc +268 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/ogg_opus_encoder.h +115 -0
- package/android/lc3Lib/src/main/cpp/google_opus_stuff/opus_tools/opus_header.h +59 -0
- package/android/lc3Lib/src/main/cpp/liblc3/CMakeLists.txt +38 -0
- package/android/lc3Lib/src/main/cpp/liblc3/include/lc3.h +309 -0
- package/android/lc3Lib/src/main/cpp/liblc3/include/lc3_private.h +162 -0
- package/android/lc3Lib/src/main/cpp/liblc3/include/rnnoise.h +114 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/CMakeLists.txt +19 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/attdet.c +92 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/attdet.h +44 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/bits.c +375 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/bits.h +315 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/bwdet.c +129 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/bwdet.h +69 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/common.h +148 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/energy.c +70 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/energy.h +43 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/fastmath.h +158 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/lc3.c +702 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/ltpf.c +893 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/ltpf.h +111 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/ltpf_arm.h +506 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/ltpf_neon.h +281 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/makefile.mk +35 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/mdct.c +452 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/mdct.h +57 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/mdct_neon.h +296 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/meson.build +46 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/plc.c +61 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/plc.h +57 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/sns.c +880 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/sns.h +103 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/spec.c +904 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/spec.h +119 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/tables.c +3457 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/tables.h +94 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/tns.c +457 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3/tns.h +99 -0
- package/android/lc3Lib/src/main/cpp/liblc3/liblc3.cpp +159 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/_kiss_fft_guts.h +182 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/arch.h +261 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/celt_lpc.c +279 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/celt_lpc.h +59 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/common.h +48 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/compile.sh +3 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/denoise.c +646 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/kiss_fft.c +601 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/kiss_fft.h +203 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/opus_types.h +159 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/pitch.c +526 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/pitch.h +149 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn.c +178 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn.h +69 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn_data.c +11051 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn_data.h +34 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn_reader.c +168 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/rnn_train.py +66 -0
- package/android/lc3Lib/src/main/cpp/liblc3/rnnoise/tansig_table.h +45 -0
- package/android/lc3Lib/src/main/java/com/glassly/lc3Lib/Lc3Cpp.java +38 -0
- package/android/lc3Lib/third_party/CMakeLists.txt +23 -0
- package/android/lc3Lib/third_party/CMakeLists_libogg.txt +18 -0
- package/android/lc3Lib/third_party/CMakeLists_libopus.txt +18 -0
- package/android/lc3Lib/third_party/CMakeLists_opus-tools.txt +23 -0
- package/android/lc3Lib/third_party/opus_tools/src/AUTHORS +5 -0
- package/android/lc3Lib/third_party/opus_tools/src/CMakeLists.txt +4 -0
- package/android/lc3Lib/third_party/opus_tools/src/COPYING +371 -0
- package/android/lc3Lib/third_party/opus_tools/src/ChangeLog +3 -0
- package/android/lc3Lib/third_party/opus_tools/src/Makefile.am +42 -0
- package/android/lc3Lib/third_party/opus_tools/src/Makefile.unix +23 -0
- package/android/lc3Lib/third_party/opus_tools/src/NEWS +0 -0
- package/android/lc3Lib/third_party/opus_tools/src/README +0 -0
- package/android/lc3Lib/third_party/opus_tools/src/autogen.sh +115 -0
- package/android/lc3Lib/third_party/opus_tools/src/configure.ac +293 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/arch.h +239 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/audio-in.c +1046 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/diag_range.c +245 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/diag_range.h +28 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/info_opus.c +320 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/info_opus.h +51 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/lpc.c +157 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/lpc.h +27 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opus_header.c +286 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opus_header.h +59 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opusdec.c +884 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opusenc.c +1021 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opusenc.h +101 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opusinfo.c +639 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/opusinfo.h +51 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/os_support.h +167 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/resample.c +1137 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/speex_resampler.h +344 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/stack_alloc.h +115 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/wav_io.c +125 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/wav_io.h +62 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/wave_out.c +223 -0
- package/android/lc3Lib/third_party/opus_tools/src/src/wave_out.h +60 -0
- package/android/settings.gradle +4 -0
- package/android/silero/LICENSE.md +17 -0
- package/android/silero/build.gradle +50 -0
- package/android/silero/proguard-rules.pro +24 -0
- package/android/silero/src/androidTest/assets/hello.wav +0 -0
- package/android/silero/src/androidTest/java/com/konovalov/vad/silero/VadSileroTest.kt +79 -0
- package/android/silero/src/main/assets/LICENSE +21 -0
- package/android/silero/src/main/assets/silero_vad.onnx +0 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/Vad.kt +160 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/VadSilero.kt +449 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/config/FrameSize.kt +15 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/config/Mode.kt +14 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/config/SampleRate.kt +12 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/utils/AudioUtils.kt +47 -0
- package/android/silero/src/main/java/com/konovalov/vad/silero/utils/TensorMap.kt +41 -0
- package/android/silero/src/test/java/com/konovalov/vad/silero/utils/AudioUtilsTest.kt +44 -0
- package/android/src/main/AndroidManifest.xml +42 -0
- package/android/src/main/assets/G2Firmware/README.md +11 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/BluetoothSdk.kt +2325 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/BluetoothSdkAnalytics.kt +216 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/BluetoothSdkDebug.kt +14 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/BluetoothSdkDefaults.kt +7 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/BluetoothSdkModule.kt +1088 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/Bridge.kt +953 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/DeviceManager.kt +2528 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/DeviceStore.kt +360 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/GeneratedChangelogCatalog.kt +8 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/GeneratedReleaseMetadata.kt +11 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/LocalNetworkModule.kt +414 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/ObservableStore.kt +88 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/OtaManifest.kt +191 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/ReleaseChangelog.kt +61 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/ScopedNetworkReadiness.kt +17 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/audio/AudioModels.kt +144 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/camera/CameraModels.kt +486 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/connection/ConnectionModels.kt +78 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/controllers/ControllerManager.kt +158 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/controllers/R1.kt +937 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/debug/BleTraceLogger.kt +165 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/events/BluetoothEvents.kt +178 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/internal/MapParsing.kt +140 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/net/LocalIpv4.kt +57 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/otaserver/LocalOtaServer.kt +304 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/otaserver/OtaServerModule.kt +120 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/photoreceiver/LocalPhotoReceiverRegistry.java +108 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/photoreceiver/LocalPhotoUploadServer.kt +622 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/photoreceiver/PhotoReceiverModule.kt +156 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/requests/DisplayRequests.kt +56 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/services/Foreground.kt +272 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/services/PhoneMic.kt +1195 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/Ar99.java +2653 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/BesOtaHeartbeatGuard.kt +49 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/BesOtaProgressMapper.kt +27 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G1.kt +3878 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G1TextSanitizer.kt +38 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G2.kt +6428 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G2CfwClassification.kt +49 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G2CfwRenderer.kt +1241 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G2CfwTextureCache.kt +270 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G2FlashProtocol.kt +291 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/G2Flasher.kt +411 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/GlasslyBle.java +43189 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/Mach1.kt +1280 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/MentraLive.kt +10817 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/MentraLiveL2capChannel.kt +274 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/MentraLivePairingAdvertisement.kt +54 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/MentraNex.kt +2011 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/Nimo.kt +2532 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/SGCManager.kt +470 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/Simulated.kt +228 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/ar99/ota/Ar99OtaManager.java +566 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/ar99/ota/OtaByteUtils.java +18 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/ar99/ota/OtaCommandConstants.java +35 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/ar99/ota/OtaCrc32Util.java +13 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/ar99/ota/OtaGattTransport.java +11 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/sgcs/ar99/ota/OtaProtocol.java +92 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/speakerid/SpeakerIdEngine.kt +525 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/status/DeviceStatus.kt +669 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/status/RuntimeState.kt +201 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/status/WifiHotspotStatus.kt +189 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/streaming/StreamModels.kt +518 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/stt/STTTools.kt +391 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/stt/SherpaOnnxTranscriber.kt +518 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/stt/VadGateSpeechPolicy.kt +229 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/tts/TTSTools.kt +248 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/types/DeviceModels.kt +96 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/AES.java +106 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/AudioSessionMonitor.kt +189 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/AvifExifStripper.java +573 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/BitmapJavaUtils.java +169 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/BleJsonCompact.java +496 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/BlePhotoUploadService.java +677 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/BleWireProtocol.java +108 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/Constants.kt +46 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/G1Text.kt +436 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/HeifExifTagReader.java +199 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/IncidentLogBleRelayNaming.java +29 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/IncidentLogBleUploadService.java +77 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/K900LengthCodec.java +115 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/K900ProtocolUtils.java +827 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/MessageChunkReassembler.java +228 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/MessageChunker.java +325 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/NexSGCUtils.kt +698 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/PhoneAudioMonitor.kt +348 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/SmartGlassesConnectionState.java +9 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/audio/Ar99OpusPcmDecoder.java +398 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/audio/ByteUtilAudioPlayer.java +655 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/audio/Lc3Player.java +441 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/audio/PCMAudioPlayer.java +431 -0
- package/android/src/main/java/com/glassly/bluetoothsdk/utils/audio/PcmStreamPlayer.kt +328 -0
- package/android/src/main/res/values/strings.xml +4 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/BluetoothSdkExceptionTest.kt +18 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/OtaManifestDowngradeTest.kt +86 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/OtaStartResponsePolicyTest.kt +30 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/ReleaseChangelogTest.kt +13 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/ScopedNetworkReadinessTest.kt +39 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/StreamStatusEventTest.kt +29 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/camera/PhotoRequestTest.kt +141 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/otaserver/LocalOtaServerTest.kt +82 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/photoreceiver/LocalPhotoReceiverRegistryTest.java +75 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/services/ForegroundServiceTypeTest.kt +69 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/Ar99AdvertisementMatcherTest.java +22 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/BesOtaHeartbeatGuardTest.kt +73 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/BesOtaProgressMapperTest.kt +67 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/EvenRleTest.kt +63 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/G1TextSanitizerTest.kt +31 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/G2CfwClassificationTest.kt +89 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/G2CfwRendererTest.kt +344 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/G2CfwTextureCacheTest.kt +200 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/G2FlashProtocolTest.kt +131 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/MentraLiveGattCharacteristicsTest.kt +39 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/MentraLivePairingAdvertisementParserTest.kt +133 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/sgcs/NimoProtocolTest.kt +333 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/AvifExifStripperTest.java +46 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/BinaryMessageChunkerTest.java +84 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/BleJsonCompactTest.java +319 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/BlePhotoUploadServiceTest.java +107 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/K900ProtocolUtilsEndiannessTest.java +172 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/K900ProtocolUtilsTest.java +24 -0
- package/android/src/test/java/com/glassly/bluetoothsdk/utils/PhoneAudioMonitorTest.kt +45 -0
- package/android/src/test/resources/avif_with_exif.avif +0 -0
- package/app.plugin.js +3 -0
- package/build/BluetoothSdk.types.d.ts +1354 -0
- package/build/BluetoothSdk.types.d.ts.map +1 -0
- package/build/BluetoothSdk.types.js +41 -0
- package/build/BluetoothSdk.types.js.map +1 -0
- package/build/_internal.d.ts +17 -0
- package/build/_internal.d.ts.map +1 -0
- package/build/_internal.js +16 -0
- package/build/_internal.js.map +1 -0
- package/build/_private/BluetoothSdkModule.d.ts +172 -0
- package/build/_private/BluetoothSdkModule.d.ts.map +1 -0
- package/build/_private/BluetoothSdkModule.js +300 -0
- package/build/_private/BluetoothSdkModule.js.map +1 -0
- package/build/_private/LocalNetworkModule.d.ts +38 -0
- package/build/_private/LocalNetworkModule.d.ts.map +1 -0
- package/build/_private/LocalNetworkModule.js +3 -0
- package/build/_private/LocalNetworkModule.js.map +1 -0
- package/build/_private/cameraRequestPayload.d.ts +4 -0
- package/build/_private/cameraRequestPayload.d.ts.map +1 -0
- package/build/_private/cameraRequestPayload.js +32 -0
- package/build/_private/cameraRequestPayload.js.map +1 -0
- package/build/_private/photoRequestPayload.d.ts +6 -0
- package/build/_private/photoRequestPayload.d.ts.map +1 -0
- package/build/_private/photoRequestPayload.js +86 -0
- package/build/_private/photoRequestPayload.js.map +1 -0
- package/build/_private/sdkOtaManifest.d.ts +11 -0
- package/build/_private/sdkOtaManifest.d.ts.map +1 -0
- package/build/_private/sdkOtaManifest.js +15 -0
- package/build/_private/sdkOtaManifest.js.map +1 -0
- package/build/changelogs.d.ts +7 -0
- package/build/changelogs.d.ts.map +1 -0
- package/build/changelogs.js +46 -0
- package/build/changelogs.js.map +1 -0
- package/build/debug.d.ts +3 -0
- package/build/debug.d.ts.map +1 -0
- package/build/debug.js +8 -0
- package/build/debug.js.map +1 -0
- package/build/generated/changelogCatalog.d.ts +9 -0
- package/build/generated/changelogCatalog.d.ts.map +1 -0
- package/build/generated/changelogCatalog.js +12 -0
- package/build/generated/changelogCatalog.js.map +1 -0
- package/build/generated/releaseMetadata.d.ts +12 -0
- package/build/generated/releaseMetadata.d.ts.map +1 -0
- package/build/generated/releaseMetadata.js +10 -0
- package/build/generated/releaseMetadata.js.map +1 -0
- package/build/index.d.ts +6 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +171 -0
- package/build/index.js.map +1 -0
- package/build/ota-server/OtaServer.types.d.ts +14 -0
- package/build/ota-server/OtaServer.types.d.ts.map +1 -0
- package/build/ota-server/OtaServer.types.js +2 -0
- package/build/ota-server/OtaServer.types.js.map +1 -0
- package/build/ota-server/OtaServerModule.d.ts +21 -0
- package/build/ota-server/OtaServerModule.d.ts.map +1 -0
- package/build/ota-server/OtaServerModule.js +3 -0
- package/build/ota-server/OtaServerModule.js.map +1 -0
- package/build/ota-server/OtaServerModule.web.d.ts +10 -0
- package/build/ota-server/OtaServerModule.web.d.ts.map +1 -0
- package/build/ota-server/OtaServerModule.web.js +12 -0
- package/build/ota-server/OtaServerModule.web.js.map +1 -0
- package/build/ota-server/index.d.ts +3 -0
- package/build/ota-server/index.d.ts.map +1 -0
- package/build/ota-server/index.js +3 -0
- package/build/ota-server/index.js.map +1 -0
- package/build/ota-transport/index.d.ts +67 -0
- package/build/ota-transport/index.d.ts.map +1 -0
- package/build/ota-transport/index.js +58 -0
- package/build/ota-transport/index.js.map +1 -0
- package/build/photo-receiver/PhotoReceiver.types.d.ts +18 -0
- package/build/photo-receiver/PhotoReceiver.types.d.ts.map +1 -0
- package/build/photo-receiver/PhotoReceiver.types.js +2 -0
- package/build/photo-receiver/PhotoReceiver.types.js.map +1 -0
- package/build/photo-receiver/PhotoReceiverModule.d.ts +10 -0
- package/build/photo-receiver/PhotoReceiverModule.d.ts.map +1 -0
- package/build/photo-receiver/PhotoReceiverModule.js +3 -0
- package/build/photo-receiver/PhotoReceiverModule.js.map +1 -0
- package/build/photo-receiver/PhotoReceiverModule.web.d.ts +10 -0
- package/build/photo-receiver/PhotoReceiverModule.web.d.ts.map +1 -0
- package/build/photo-receiver/PhotoReceiverModule.web.js +12 -0
- package/build/photo-receiver/PhotoReceiverModule.web.js.map +1 -0
- package/build/photo-receiver/index.d.ts +3 -0
- package/build/photo-receiver/index.d.ts.map +1 -0
- package/build/photo-receiver/index.js +3 -0
- package/build/photo-receiver/index.js.map +1 -0
- package/build/react/index.d.ts +5 -0
- package/build/react/index.d.ts.map +1 -0
- package/build/react/index.js +4 -0
- package/build/react/index.js.map +1 -0
- package/build/react/useBluetooth.d.ts +100 -0
- package/build/react/useBluetooth.d.ts.map +1 -0
- package/build/react/useBluetooth.js +167 -0
- package/build/react/useBluetooth.js.map +1 -0
- package/build/react/useBluetoothEvent.d.ts +6 -0
- package/build/react/useBluetoothEvent.d.ts.map +1 -0
- package/build/react/useBluetoothEvent.js +21 -0
- package/build/react/useBluetoothEvent.js.map +1 -0
- package/build/react/useBluetoothScan.d.ts +22 -0
- package/build/react/useBluetoothScan.d.ts.map +1 -0
- package/build/react/useBluetoothScan.js +135 -0
- package/build/react/useBluetoothScan.js.map +1 -0
- package/build/react/useBluetoothStatus.d.ts +16 -0
- package/build/react/useBluetoothStatus.d.ts.map +1 -0
- package/build/react/useBluetoothStatus.js +137 -0
- package/build/react/useBluetoothStatus.js.map +1 -0
- package/build/react/useGlassesConnection.d.ts +29 -0
- package/build/react/useGlassesConnection.d.ts.map +1 -0
- package/build/react/useGlassesConnection.js +153 -0
- package/build/react/useGlassesConnection.js.map +1 -0
- package/build/types/index.d.ts +3 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/index.js +2 -0
- package/build/types/index.js.map +1 -0
- package/expo-module.config.json +14 -0
- package/ios/BackgroundOtaArtifactDownloader.swift +125 -0
- package/ios/BluetoothSdkModule.swift +1034 -0
- package/ios/GlasslyBluetoothSDK.podspec +106 -0
- package/ios/LocalIPv4.swift +150 -0
- package/ios/LocalOtaServer.swift +309 -0
- package/ios/LocalPhotoUploadServer.swift +754 -0
- package/ios/OtaServerModule.swift +147 -0
- package/ios/Packages/CoreObjC/CoreObjC.xcodeproj/project.pbxproj +213 -0
- package/ios/Packages/CoreObjC/PcmConverter.h +22 -0
- package/ios/Packages/CoreObjC/PcmConverter.m +266 -0
- package/ios/Packages/CoreObjC/attdet.c +92 -0
- package/ios/Packages/CoreObjC/attdet.h +44 -0
- package/ios/Packages/CoreObjC/bits.c +375 -0
- package/ios/Packages/CoreObjC/bits.h +315 -0
- package/ios/Packages/CoreObjC/bwdet.c +129 -0
- package/ios/Packages/CoreObjC/bwdet.h +69 -0
- package/ios/Packages/CoreObjC/common.h +151 -0
- package/ios/Packages/CoreObjC/energy.c +70 -0
- package/ios/Packages/CoreObjC/energy.h +43 -0
- package/ios/Packages/CoreObjC/fastmath.h +158 -0
- package/ios/Packages/CoreObjC/include/PcmConverter.h +22 -0
- package/ios/Packages/CoreObjC/lc3.c +704 -0
- package/ios/Packages/CoreObjC/lc3.h +313 -0
- package/ios/Packages/CoreObjC/lc3_cpp.h +283 -0
- package/ios/Packages/CoreObjC/lc3_private.h +163 -0
- package/ios/Packages/CoreObjC/ltpf.c +905 -0
- package/ios/Packages/CoreObjC/ltpf.h +111 -0
- package/ios/Packages/CoreObjC/ltpf_arm.h +506 -0
- package/ios/Packages/CoreObjC/ltpf_neon.h +281 -0
- package/ios/Packages/CoreObjC/makefile.mk +35 -0
- package/ios/Packages/CoreObjC/mdct.c +469 -0
- package/ios/Packages/CoreObjC/mdct.h +57 -0
- package/ios/Packages/CoreObjC/mdct_neon.h +296 -0
- package/ios/Packages/CoreObjC/meson.build +61 -0
- package/ios/Packages/CoreObjC/plc.c +61 -0
- package/ios/Packages/CoreObjC/plc.h +57 -0
- package/ios/Packages/CoreObjC/rnnoise.h +114 -0
- package/ios/Packages/CoreObjC/sns.c +880 -0
- package/ios/Packages/CoreObjC/sns.h +103 -0
- package/ios/Packages/CoreObjC/spec.c +907 -0
- package/ios/Packages/CoreObjC/spec.h +119 -0
- package/ios/Packages/CoreObjC/tables.c +3457 -0
- package/ios/Packages/CoreObjC/tables.h +94 -0
- package/ios/Packages/CoreObjC/tns.c +457 -0
- package/ios/Packages/CoreObjC/tns.h +99 -0
- package/ios/Packages/SherpaOnnx/Model/joiner.onnx +0 -0
- package/ios/Packages/SherpaOnnx/Model/tokens.txt +502 -0
- package/ios/Packages/SherpaOnnx/SherpaOnnx.swift +2383 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/Info.plist +48 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64/Headers/sherpa-onnx/c-api/c-api.h +4689 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64/Headers/sherpa-onnx/c-api/cxx-api.h +2036 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64/libsherpa-onnx.a +0 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64_x86_64-simulator/Headers/sherpa-onnx/c-api/c-api.h +4689 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64_x86_64-simulator/Headers/sherpa-onnx/c-api/cxx-api.h +2036 -0
- package/ios/Packages/SherpaOnnx/sherpa-onnx.xcframework/ios-arm64_x86_64-simulator/libsherpa-onnx.a +0 -0
- package/ios/Packages/libbz2/module.modulemap +5 -0
- package/ios/Packages/libbz2/shim.h +1 -0
- package/ios/PhotoReceiverModule.swift +129 -0
- package/ios/Source/BluetoothSDK.swift +2303 -0
- package/ios/Source/BluetoothSDKDebug.swift +12 -0
- package/ios/Source/BluetoothSdkDefaults.swift +29 -0
- package/ios/Source/Bridge.swift +708 -0
- package/ios/Source/Bridging-Header.h +16 -0
- package/ios/Source/DeviceManager.swift +2109 -0
- package/ios/Source/DeviceStore.swift +336 -0
- package/ios/Source/GeneratedChangelogCatalog.swift +7 -0
- package/ios/Source/GeneratedReleaseMetadata.swift +11 -0
- package/ios/Source/ObservableStore.swift +118 -0
- package/ios/Source/OtaManifest.swift +211 -0
- package/ios/Source/PrivacyInfo.xcprivacy +23 -0
- package/ios/Source/ReleaseChangelog.swift +65 -0
- package/ios/Source/Resources/G2Firmware/README.md +10 -0
- package/ios/Source/audio/AudioModels.swift +178 -0
- package/ios/Source/audio/PcmStreamPlayer.swift +410 -0
- package/ios/Source/camera/CameraModels.swift +866 -0
- package/ios/Source/connection/ScanSession.swift +27 -0
- package/ios/Source/controllers/ControllerManager.swift +184 -0
- package/ios/Source/controllers/R1.swift +829 -0
- package/ios/Source/errors/BluetoothSdkError.swift +19 -0
- package/ios/Source/events/BluetoothEvents.swift +342 -0
- package/ios/Source/internal/BleTraceLogger.swift +192 -0
- package/ios/Source/internal/BluetoothAvailability.swift +78 -0
- package/ios/Source/internal/BluetoothSdkAnalytics.swift +199 -0
- package/ios/Source/internal/ValueParsing.swift +99 -0
- package/ios/Source/requests/DisplayRequests.swift +82 -0
- package/ios/Source/services/PhoneMic.swift +662 -0
- package/ios/Source/sgcs/Ar99.swift +2451 -0
- package/ios/Source/sgcs/Frame.swift +649 -0
- package/ios/Source/sgcs/G1.swift +2554 -0
- package/ios/Source/sgcs/G2.swift +6887 -0
- package/ios/Source/sgcs/G2CfwClassification.swift +43 -0
- package/ios/Source/sgcs/G2CfwRenderer.swift +1279 -0
- package/ios/Source/sgcs/G2CfwTextureCache.swift +233 -0
- package/ios/Source/sgcs/G2FlashProtocol.swift +312 -0
- package/ios/Source/sgcs/G2Flasher.swift +773 -0
- package/ios/Source/sgcs/Mach1.swift +541 -0
- package/ios/Source/sgcs/MentraLive.swift +7011 -0
- package/ios/Source/sgcs/MentraLiveL2capChannel.swift +183 -0
- package/ios/Source/sgcs/MentraLivePairingAdvertisement.swift +64 -0
- package/ios/Source/sgcs/MentraNex.swift +3221 -0
- package/ios/Source/sgcs/Nimo.swift +1886 -0
- package/ios/Source/sgcs/SGCManager.swift +608 -0
- package/ios/Source/sgcs/Simulated.swift +274 -0
- package/ios/Source/sgcs/ar99/ota/Ar99OtaManager.swift +637 -0
- package/ios/Source/sgcs/glassly_ble.pb.swift +4354 -0
- package/ios/Source/speakerid/SpeakerIdEngine.swift +573 -0
- package/ios/Source/status/DeviceStatus.swift +981 -0
- package/ios/Source/status/RuntimeState.swift +359 -0
- package/ios/Source/status/WifiHotspotStatus.swift +345 -0
- package/ios/Source/streaming/StreamModels.swift +693 -0
- package/ios/Source/stt/STTTools.swift +191 -0
- package/ios/Source/stt/SherpaOnnxTranscriber.swift +466 -0
- package/ios/Source/tts/TTSTools.swift +171 -0
- package/ios/Source/types/DeviceModels.swift +177 -0
- package/ios/Source/utils/AudioSessionMonitor.swift +283 -0
- package/ios/Source/utils/BinaryCodec.swift +61 -0
- package/ios/Source/utils/BleJsonCompact.swift +405 -0
- package/ios/Source/utils/BleWireProtocol.swift +92 -0
- package/ios/Source/utils/Constants.swift +78 -0
- package/ios/Source/utils/Enums.swift +95 -0
- package/ios/Source/utils/G1Text.swift +2096 -0
- package/ios/Source/utils/JSCExperiment.swift +241 -0
- package/ios/Source/utils/MemoryMonitor.swift +44 -0
- package/ios/Source/utils/MessageChunkReassembler.swift +190 -0
- package/ios/Source/utils/MessageChunker.swift +294 -0
- package/ios/Source/utils/Models.swift +135 -0
- package/ios/Source/utils/PhoneAudioMonitor.swift +230 -0
- package/ios/Source/utils/TarBz2Extractor.swift +257 -0
- package/ios/Tests/BluetoothSDKTests/G2CfwClassificationTests.swift +78 -0
- package/ios/Tests/BluetoothSDKTests/G2CfwRendererTests.swift +372 -0
- package/ios/Tests/BluetoothSDKTests/G2CfwTextureCacheTests.swift +162 -0
- package/ios/Tests/BluetoothSDKTests/G2FlashProtocolTests.swift +182 -0
- package/ios/Tests/MentraLivePairingAdvertisementTests.swift +160 -0
- package/ios/Tests/ReleaseChangelogTests.swift +13 -0
- package/package.json +129 -0
- package/plugin/build/index.d.ts +10 -0
- package/plugin/build/index.js +12 -0
- package/plugin/build/withAndroid.d.ts +3 -0
- package/plugin/build/withAndroid.js +190 -0
- package/plugin/build/withIos.d.ts +5 -0
- package/plugin/build/withIos.js +108 -0
- package/scripts/inject-ios-sdk-version.mjs +65 -0
- package/scripts/public-ota-api.test.mjs +37 -0
- package/scripts/verify-release-package.mjs +45 -0
- package/scripts/write-release-metadata.mjs +152 -0
- package/scripts/write-release-metadata.test.mjs +37 -0
- package/src/BluetoothSdk.types.ts +1623 -0
- package/src/_internal.ts +16 -0
- package/src/_private/BluetoothSdkModule.ts +684 -0
- package/src/_private/LocalNetworkModule.ts +50 -0
- package/src/_private/cameraRequestPayload.ts +34 -0
- package/src/_private/photoRequestPayload.ts +90 -0
- package/src/_private/sdkOtaManifest.ts +18 -0
- package/src/changelogs.ts +46 -0
- package/src/debug.ts +9 -0
- package/src/generated/changelogCatalog.ts +13 -0
- package/src/generated/releaseMetadata.ts +20 -0
- package/src/index.ts +321 -0
- package/src/ota-server/OtaServer.types.ts +10 -0
- package/src/ota-server/OtaServerModule.ts +23 -0
- package/src/ota-server/OtaServerModule.web.ts +17 -0
- package/src/ota-server/index.ts +2 -0
- package/src/ota-transport/index.ts +116 -0
- package/src/photo-receiver/PhotoReceiver.types.ts +20 -0
- package/src/photo-receiver/PhotoReceiverModule.ts +11 -0
- package/src/photo-receiver/PhotoReceiverModule.web.ts +17 -0
- package/src/photo-receiver/index.ts +2 -0
- package/src/react/index.ts +21 -0
- package/src/react/useBluetooth.ts +309 -0
- package/src/react/useBluetoothEvent.ts +35 -0
- package/src/react/useBluetoothScan.ts +173 -0
- package/src/react/useBluetoothStatus.ts +180 -0
- package/src/react/useGlassesConnection.ts +202 -0
- package/src/types/index.ts +12 -0
|
@@ -0,0 +1,1354 @@
|
|
|
1
|
+
export type GlassesNotReadyEvent = {
|
|
2
|
+
type: "glasses_not_ready";
|
|
3
|
+
message: string;
|
|
4
|
+
};
|
|
5
|
+
export type G2FirmwareTarget = "stock" | "glassly-cfw";
|
|
6
|
+
export type G2FirmwareArtifact = {
|
|
7
|
+
id: G2FirmwareTarget;
|
|
8
|
+
displayName: string;
|
|
9
|
+
version: string;
|
|
10
|
+
fileName: string;
|
|
11
|
+
sha256: string;
|
|
12
|
+
size: number;
|
|
13
|
+
};
|
|
14
|
+
export type G2FirmwareFlashProgressEvent = {
|
|
15
|
+
type: "g2_firmware_flash_progress";
|
|
16
|
+
message: string;
|
|
17
|
+
progress: number;
|
|
18
|
+
done: boolean;
|
|
19
|
+
ok: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type G2FirmwareFlashResult = {
|
|
22
|
+
ok: boolean;
|
|
23
|
+
target: G2FirmwareTarget;
|
|
24
|
+
version: string;
|
|
25
|
+
sha256: string;
|
|
26
|
+
};
|
|
27
|
+
export type ButtonPressEvent = {
|
|
28
|
+
buttonId: string;
|
|
29
|
+
pressType: "long" | "short";
|
|
30
|
+
timestamp: number;
|
|
31
|
+
};
|
|
32
|
+
export type TouchEvent = {
|
|
33
|
+
type: "touch_event";
|
|
34
|
+
deviceModel: DeviceModel;
|
|
35
|
+
gestureName: string;
|
|
36
|
+
timestamp: number;
|
|
37
|
+
};
|
|
38
|
+
export type AccelEvent = {
|
|
39
|
+
type: "accel_event";
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
z: number;
|
|
43
|
+
timestamp: number;
|
|
44
|
+
};
|
|
45
|
+
export type HeadUpEvent = {
|
|
46
|
+
up: boolean;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Glasses magnetometer heading, streamed while the native navigation mode is
|
|
50
|
+
* active (G2 service 0x08). Degrees 0…359, 0 = magnetic north.
|
|
51
|
+
*/
|
|
52
|
+
export type CompassHeadingEvent = {
|
|
53
|
+
type: "compass_heading";
|
|
54
|
+
heading: number;
|
|
55
|
+
timestamp: number;
|
|
56
|
+
};
|
|
57
|
+
/** Magnetometer calibration prompts — the wearer should look around / figure-8. */
|
|
58
|
+
export type CompassCalibrationEvent = {
|
|
59
|
+
type: "compass_calibration";
|
|
60
|
+
status: "start" | "complete";
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Native navigation mode lifecycle. `source: "glasses"` means the wearer (or
|
|
64
|
+
* firmware) exited the nav UI on the device itself, not the phone.
|
|
65
|
+
*/
|
|
66
|
+
export type NavigationModeEvent = {
|
|
67
|
+
type: "navigation_mode_change";
|
|
68
|
+
status: "entered" | "exited";
|
|
69
|
+
source?: string;
|
|
70
|
+
};
|
|
71
|
+
/** Wearer toggled the mini-map / overview review view on the glasses. */
|
|
72
|
+
export type NavigationViewEvent = {
|
|
73
|
+
type: "navigation_view_change";
|
|
74
|
+
viewIndex: number;
|
|
75
|
+
};
|
|
76
|
+
export type VoiceActivityDetectionStatusEvent = {
|
|
77
|
+
type: "voice_activity_detection_status";
|
|
78
|
+
voiceActivityDetectionEnabled: boolean;
|
|
79
|
+
};
|
|
80
|
+
export declare const DEFAULT_VOICE_ACTIVITY_DETECTION_ENABLED = false;
|
|
81
|
+
export type SpeakingStatusEvent = {
|
|
82
|
+
type: "speaking_status";
|
|
83
|
+
speaking: boolean;
|
|
84
|
+
timestamp: number;
|
|
85
|
+
};
|
|
86
|
+
export type BatteryStatusEvent = {
|
|
87
|
+
type: "battery_status";
|
|
88
|
+
level: number;
|
|
89
|
+
charging: boolean;
|
|
90
|
+
timestamp: number;
|
|
91
|
+
};
|
|
92
|
+
export type GlassesConnectionStatus = {
|
|
93
|
+
state: "disconnected";
|
|
94
|
+
} | {
|
|
95
|
+
state: "scanning";
|
|
96
|
+
} | {
|
|
97
|
+
state: "connecting";
|
|
98
|
+
} | {
|
|
99
|
+
state: "bonding";
|
|
100
|
+
} | {
|
|
101
|
+
state: "connected";
|
|
102
|
+
fullyBooted: boolean;
|
|
103
|
+
};
|
|
104
|
+
export type ConnectedGlassesConnectionStatus = Extract<GlassesConnectionStatus, {
|
|
105
|
+
state: "connected";
|
|
106
|
+
}>;
|
|
107
|
+
export declare function isConnectedGlassesConnectionStatus(status: GlassesConnectionStatus): status is ConnectedGlassesConnectionStatus;
|
|
108
|
+
export declare function isReadyGlassesConnectionStatus(status: GlassesConnectionStatus): boolean;
|
|
109
|
+
export declare function isBusyGlassesConnectionStatus(status: GlassesConnectionStatus): boolean;
|
|
110
|
+
export declare function createDisconnectedGlassesStatus(): Partial<GlassesStatus>;
|
|
111
|
+
/** K900 `sr_getvol` response (Mentra Live glasses media step volume 0闂?5). */
|
|
112
|
+
export type GlassesMediaVolumeGetResult = {
|
|
113
|
+
level: number;
|
|
114
|
+
statusCode: number;
|
|
115
|
+
};
|
|
116
|
+
/** K900 `sr_vol` acknowledgment. */
|
|
117
|
+
export type GlassesMediaVolumeSetResult = {
|
|
118
|
+
statusCode: number;
|
|
119
|
+
};
|
|
120
|
+
export type LocalTranscriptionEvent = {
|
|
121
|
+
text: string;
|
|
122
|
+
isFinal?: boolean;
|
|
123
|
+
transcribeLanguage?: string;
|
|
124
|
+
/** Enrolled profile id when the on-device speaker engine matched, else 0. */
|
|
125
|
+
speakerId?: number | string;
|
|
126
|
+
/** Additive speaker resolution — present only when a profile matched. */
|
|
127
|
+
resolvedSpeakerId?: string;
|
|
128
|
+
resolvedSpeakerName?: string;
|
|
129
|
+
startTime?: number;
|
|
130
|
+
endTime?: number;
|
|
131
|
+
provider?: string;
|
|
132
|
+
};
|
|
133
|
+
/** One on-device speaker-identification window (SpeakerIdEngine).
|
|
134
|
+
* `speakerId`/`name` are absent for an unknown (unenrolled) voice. */
|
|
135
|
+
export type SpeakerDetectedEvent = {
|
|
136
|
+
speakerId?: string;
|
|
137
|
+
name?: string;
|
|
138
|
+
similarity: number;
|
|
139
|
+
/** Epoch ms window bounds (native clock, same epoch as Date.now()). */
|
|
140
|
+
startMs: number;
|
|
141
|
+
endMs: number;
|
|
142
|
+
};
|
|
143
|
+
export type SpeakerEnrollProgressEvent = {
|
|
144
|
+
voicedSeconds: number;
|
|
145
|
+
targetSeconds: number;
|
|
146
|
+
/** RMS level of the latest chunk, 0..1 — drives the recording meter. */
|
|
147
|
+
level: number;
|
|
148
|
+
};
|
|
149
|
+
export type SpeakerEnrollResultEvent = {
|
|
150
|
+
ok: boolean;
|
|
151
|
+
/** Failure reason when !ok: "inconsistent" | "too_short" | "model_unavailable" | "unsupported". */
|
|
152
|
+
reason?: string;
|
|
153
|
+
/** base64 Float32Array chunk embeddings (raw audio is already discarded). */
|
|
154
|
+
embeddings?: string[];
|
|
155
|
+
dim?: number;
|
|
156
|
+
/** Which mic captured the enrollment audio. */
|
|
157
|
+
source: "glasses" | "phone";
|
|
158
|
+
};
|
|
159
|
+
export type SpeakerProfilePush = {
|
|
160
|
+
id: string;
|
|
161
|
+
name: string;
|
|
162
|
+
/** base64 Float32Array centroid. */
|
|
163
|
+
embedding: string;
|
|
164
|
+
};
|
|
165
|
+
export type LogEvent = {
|
|
166
|
+
message: string;
|
|
167
|
+
};
|
|
168
|
+
export type WifiStatus = {
|
|
169
|
+
state: "disconnected";
|
|
170
|
+
} | {
|
|
171
|
+
state: "connected";
|
|
172
|
+
ssid: string;
|
|
173
|
+
localIp?: string;
|
|
174
|
+
};
|
|
175
|
+
export type ConnectedWifiStatus = Extract<WifiStatus, {
|
|
176
|
+
state: "connected";
|
|
177
|
+
}>;
|
|
178
|
+
export declare function isConnectedWifiStatus(status: WifiStatus): status is ConnectedWifiStatus;
|
|
179
|
+
export type WifiStatusChangeEvent = WifiStatus & {
|
|
180
|
+
type: "wifi_status_change";
|
|
181
|
+
/**
|
|
182
|
+
* Glasses-reported provisioning failure reason when THIS event is the verdict of a
|
|
183
|
+
* failed connect attempt; absent on routine link-state updates. An attempt property,
|
|
184
|
+
* not a link property 闂?which is why it lives on the event, not on WifiStatus:
|
|
185
|
+
* "connect_timeout" arrives on a disconnected status (never associated), while
|
|
186
|
+
* "connected_to_other_network" arrives on a *connected* status (the attempt failed
|
|
187
|
+
* and the glasses ended up on / fell back to a different SSID than requested).
|
|
188
|
+
* Requires ASG client v40+ 闂?older glasses never send it.
|
|
189
|
+
*/
|
|
190
|
+
error?: string;
|
|
191
|
+
};
|
|
192
|
+
export type HotspotStatus = {
|
|
193
|
+
state: "disabled";
|
|
194
|
+
} | {
|
|
195
|
+
state: "enabled";
|
|
196
|
+
ssid: string;
|
|
197
|
+
password: string;
|
|
198
|
+
localIp: string;
|
|
199
|
+
};
|
|
200
|
+
export type EnabledHotspotStatus = Extract<HotspotStatus, {
|
|
201
|
+
state: "enabled";
|
|
202
|
+
}>;
|
|
203
|
+
export declare function isEnabledHotspotStatus(status: HotspotStatus): status is EnabledHotspotStatus;
|
|
204
|
+
export type HotspotStatusChangeEvent = HotspotStatus & {
|
|
205
|
+
type: "hotspot_status_change";
|
|
206
|
+
};
|
|
207
|
+
export type HotspotErrorEvent = {
|
|
208
|
+
type: "hotspot_error";
|
|
209
|
+
errorMessage: string;
|
|
210
|
+
timestamp: number;
|
|
211
|
+
};
|
|
212
|
+
export type VersionInfoResult = {
|
|
213
|
+
androidVersion: string;
|
|
214
|
+
firmwareVersion: string;
|
|
215
|
+
besFirmwareVersion: string;
|
|
216
|
+
mtkFirmwareVersion: string;
|
|
217
|
+
buildNumber: string;
|
|
218
|
+
systemTimeMs?: number;
|
|
219
|
+
otaVersionUrl: string;
|
|
220
|
+
appVersion: string;
|
|
221
|
+
/** Phone-served hotspot OTA protocol version; 0 means unsupported/legacy glasses. */
|
|
222
|
+
hotspotOtaVersion: number;
|
|
223
|
+
};
|
|
224
|
+
export type VersionInfoEvent = VersionInfoResult & {
|
|
225
|
+
type: "version_info";
|
|
226
|
+
};
|
|
227
|
+
export type WifiScanResultEvent = {
|
|
228
|
+
type: "wifi_scan_result";
|
|
229
|
+
networks: WifiSearchResult[];
|
|
230
|
+
scanComplete?: boolean;
|
|
231
|
+
};
|
|
232
|
+
export type PhotoResponseEvent = {
|
|
233
|
+
type: "photo_response";
|
|
234
|
+
state: "success";
|
|
235
|
+
requestId: string;
|
|
236
|
+
uploadUrl: string;
|
|
237
|
+
photoUrl?: string;
|
|
238
|
+
statusUrl?: string;
|
|
239
|
+
contentType?: string;
|
|
240
|
+
fileSizeBytes?: number;
|
|
241
|
+
timestamp: number;
|
|
242
|
+
} | {
|
|
243
|
+
type: "photo_response";
|
|
244
|
+
state: "error";
|
|
245
|
+
requestId: string;
|
|
246
|
+
timestamp: number;
|
|
247
|
+
errorCode?: string;
|
|
248
|
+
errorMessage: string;
|
|
249
|
+
};
|
|
250
|
+
export type PhotoSuccessResponseEvent = Extract<PhotoResponseEvent, {
|
|
251
|
+
state: "success";
|
|
252
|
+
}>;
|
|
253
|
+
export type PhotoStatusState = "accepted" | "queued" | "configuring" | "capturing" | "captured" | "compressing" | "ble_fallback_compression" | "uploading" | "uploaded" | "ready_for_transfer" | "transferring" | "failed";
|
|
254
|
+
export type PhotoResolvedConfig = {
|
|
255
|
+
format?: "jpeg" | string;
|
|
256
|
+
width?: number;
|
|
257
|
+
height?: number;
|
|
258
|
+
quality?: number;
|
|
259
|
+
requestedSize?: PhotoSize | string;
|
|
260
|
+
source?: "sdk" | "button" | string;
|
|
261
|
+
transferMethod?: "webhook" | "ble" | "local" | string;
|
|
262
|
+
compression?: PhotoCompression | string;
|
|
263
|
+
saveToGallery?: boolean;
|
|
264
|
+
exposureTimeNs?: number;
|
|
265
|
+
iso?: number;
|
|
266
|
+
};
|
|
267
|
+
export type PhotoFpsRange = {
|
|
268
|
+
min?: number;
|
|
269
|
+
max?: number;
|
|
270
|
+
};
|
|
271
|
+
export type PhotoRequestedCaptureConfig = {
|
|
272
|
+
manual?: boolean;
|
|
273
|
+
exposureTimeNs?: number;
|
|
274
|
+
iso?: number;
|
|
275
|
+
frameDurationNs?: number;
|
|
276
|
+
aeMode?: number;
|
|
277
|
+
aeLock?: boolean;
|
|
278
|
+
aeExposureCompensation?: number;
|
|
279
|
+
aeTargetFpsRange?: PhotoFpsRange;
|
|
280
|
+
noiseReductionMode?: number;
|
|
281
|
+
edgeMode?: number;
|
|
282
|
+
afMode?: number;
|
|
283
|
+
zsl?: boolean;
|
|
284
|
+
};
|
|
285
|
+
export type PhotoMeteredPreview = {
|
|
286
|
+
exposureTimeNs?: number;
|
|
287
|
+
iso?: number;
|
|
288
|
+
totalLightProxy?: number;
|
|
289
|
+
};
|
|
290
|
+
export type PhotoCaptureMetadata = {
|
|
291
|
+
manual?: boolean;
|
|
292
|
+
exposureTimeNs?: number;
|
|
293
|
+
iso?: number;
|
|
294
|
+
frameDurationNs?: number;
|
|
295
|
+
aeMode?: number;
|
|
296
|
+
aeState?: number;
|
|
297
|
+
aeStateName?: string;
|
|
298
|
+
noiseReductionMode?: number;
|
|
299
|
+
edgeMode?: number;
|
|
300
|
+
zsl?: boolean;
|
|
301
|
+
sensorTimestampNs?: number;
|
|
302
|
+
totalLightProxy?: number;
|
|
303
|
+
mfnrLikely?: boolean;
|
|
304
|
+
mfnrApplied?: boolean;
|
|
305
|
+
width?: number;
|
|
306
|
+
height?: number;
|
|
307
|
+
noiseReductionWarning?: "not_implemented" | string;
|
|
308
|
+
ispDigitalGainWarning?: "not_implemented" | string;
|
|
309
|
+
ispAnalogGainWarning?: "not_implemented" | string;
|
|
310
|
+
[key: string]: unknown;
|
|
311
|
+
};
|
|
312
|
+
export type PhotoStatusEvent = {
|
|
313
|
+
type: "photo_status";
|
|
314
|
+
requestId: string;
|
|
315
|
+
status: PhotoStatusState | string;
|
|
316
|
+
timestamp: number;
|
|
317
|
+
resolvedConfig?: PhotoResolvedConfig;
|
|
318
|
+
requestedCaptureConfig?: PhotoRequestedCaptureConfig;
|
|
319
|
+
meteredPreview?: PhotoMeteredPreview;
|
|
320
|
+
captureMetadata?: PhotoCaptureMetadata;
|
|
321
|
+
errorCode?: string;
|
|
322
|
+
errorMessage?: string;
|
|
323
|
+
};
|
|
324
|
+
export type CameraStatusEvent = {
|
|
325
|
+
type: "camera_status";
|
|
326
|
+
requestId: string;
|
|
327
|
+
state: "warming" | "ready" | "stopped" | "error" | string;
|
|
328
|
+
timestamp: number;
|
|
329
|
+
errorCode?: string;
|
|
330
|
+
errorMessage?: string;
|
|
331
|
+
};
|
|
332
|
+
export type VideoRecordingStatusEvent = {
|
|
333
|
+
type: "video_recording_status";
|
|
334
|
+
requestId?: string;
|
|
335
|
+
success: boolean;
|
|
336
|
+
status: VideoRecordingStatusState;
|
|
337
|
+
details?: string | null;
|
|
338
|
+
timestamp: number;
|
|
339
|
+
data?: {
|
|
340
|
+
recording?: boolean;
|
|
341
|
+
duration_ms?: number;
|
|
342
|
+
duration_formatted?: string;
|
|
343
|
+
[key: string]: unknown;
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
export type VideoRecordingStatusState = "recording_started" | "recording_status" | "already_recording" | "recording_stopped" | "not_recording" | "request_id_mismatch" | "service_unavailable" | "json_error" | "battery_low" | "camera_busy" | "storage_unavailable" | "integrity_failed" | "error";
|
|
347
|
+
export type VideoRecordingStartedStatusEvent = Omit<VideoRecordingStatusEvent, "success" | "status"> & {
|
|
348
|
+
success: true;
|
|
349
|
+
status: "recording_started";
|
|
350
|
+
};
|
|
351
|
+
export type VideoRecordingStoppedStatusEvent = Omit<VideoRecordingStatusEvent, "success" | "status"> & {
|
|
352
|
+
success: true;
|
|
353
|
+
status: "recording_stopped";
|
|
354
|
+
};
|
|
355
|
+
export type VideoRecordingSuccessStatusEvent = VideoRecordingStartedStatusEvent | VideoRecordingStoppedStatusEvent;
|
|
356
|
+
export type MediaUploadSuccessEvent = {
|
|
357
|
+
type: "media_success";
|
|
358
|
+
requestId: string;
|
|
359
|
+
mediaUrl: string;
|
|
360
|
+
mediaType: number;
|
|
361
|
+
timestamp: number;
|
|
362
|
+
};
|
|
363
|
+
export type MediaUploadErrorEvent = {
|
|
364
|
+
type: "media_error";
|
|
365
|
+
requestId: string;
|
|
366
|
+
errorMessage: string;
|
|
367
|
+
mediaType: number;
|
|
368
|
+
timestamp: number;
|
|
369
|
+
};
|
|
370
|
+
export type MediaUploadEvent = MediaUploadSuccessEvent | MediaUploadErrorEvent;
|
|
371
|
+
export type GalleryStatusEvent = {
|
|
372
|
+
type: "gallery_status";
|
|
373
|
+
photos: number;
|
|
374
|
+
videos: number;
|
|
375
|
+
total: number;
|
|
376
|
+
totalSize?: number;
|
|
377
|
+
hasContent: boolean;
|
|
378
|
+
cameraBusy: boolean;
|
|
379
|
+
cameraBusyReason?: "video" | "stream" | (string & {});
|
|
380
|
+
};
|
|
381
|
+
export type CompatibleGlassesSearchStopEvent = {
|
|
382
|
+
type: "compatible_glasses_search_stop";
|
|
383
|
+
deviceModel: DeviceModel;
|
|
384
|
+
};
|
|
385
|
+
export type HeartbeatSentEvent = {
|
|
386
|
+
type: "heartbeat_sent";
|
|
387
|
+
heartbeat_sent: {
|
|
388
|
+
timestamp: number;
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
export type HeartbeatReceivedEvent = {
|
|
392
|
+
type: "heartbeat_received";
|
|
393
|
+
heartbeat_received: {
|
|
394
|
+
timestamp: number;
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
export type SwipeVolumeStatusEvent = {
|
|
398
|
+
type: "swipe_volume_status";
|
|
399
|
+
enabled: boolean;
|
|
400
|
+
timestamp: number;
|
|
401
|
+
};
|
|
402
|
+
export type SwitchStatusEvent = {
|
|
403
|
+
type: "switch_status";
|
|
404
|
+
switchType?: number;
|
|
405
|
+
switchValue?: number;
|
|
406
|
+
timestamp: number;
|
|
407
|
+
};
|
|
408
|
+
export type RgbLedControlResponseEvent = {
|
|
409
|
+
type: "rgb_led_control_response";
|
|
410
|
+
state: "success";
|
|
411
|
+
requestId: string;
|
|
412
|
+
} | {
|
|
413
|
+
type: "rgb_led_control_response";
|
|
414
|
+
state: "error";
|
|
415
|
+
requestId: string;
|
|
416
|
+
errorCode: string;
|
|
417
|
+
};
|
|
418
|
+
export type RgbLedControlSuccessResponseEvent = Extract<RgbLedControlResponseEvent, {
|
|
419
|
+
state: "success";
|
|
420
|
+
}>;
|
|
421
|
+
export type SettingsAckStatus = "applied" | "ready" | "error" | "failed" | "failure" | "rejected";
|
|
422
|
+
export type SettingsAckSetting = "gallery_mode" | "button_photo" | "button_video_recording" | "button_max_recording_time" | "camera_fov" | "camera_fov_override" | "camera_tuning";
|
|
423
|
+
export type SettingsAckEvent = {
|
|
424
|
+
type: "settings_ack";
|
|
425
|
+
requestId: string;
|
|
426
|
+
setting: SettingsAckSetting;
|
|
427
|
+
status: SettingsAckStatus;
|
|
428
|
+
timestamp: number;
|
|
429
|
+
fov?: number;
|
|
430
|
+
roiPosition?: CameraRoiPositionValue;
|
|
431
|
+
hardwareApplied?: boolean;
|
|
432
|
+
leaseId?: string;
|
|
433
|
+
active?: boolean;
|
|
434
|
+
size?: ButtonPhotoSize | string;
|
|
435
|
+
width?: number;
|
|
436
|
+
height?: number;
|
|
437
|
+
fps?: number;
|
|
438
|
+
enabled?: boolean;
|
|
439
|
+
minutes?: number;
|
|
440
|
+
/** ANR enabled flag; present when setting === "camera_tuning" */
|
|
441
|
+
anr?: boolean;
|
|
442
|
+
/** Stock-gain flag; present when setting === "camera_tuning" */
|
|
443
|
+
gain?: boolean;
|
|
444
|
+
errorCode?: string;
|
|
445
|
+
errorMessage?: string;
|
|
446
|
+
};
|
|
447
|
+
export type SettingsAckSuccessStatus = Exclude<SettingsAckStatus, "error" | "failed" | "failure" | "rejected">;
|
|
448
|
+
export type SettingsAckSuccessEvent = Omit<SettingsAckEvent, "status"> & {
|
|
449
|
+
status: SettingsAckSuccessStatus;
|
|
450
|
+
};
|
|
451
|
+
export type RgbLedAction = "on" | "off";
|
|
452
|
+
export type RgbLedColor = "red" | "green" | "blue" | "orange" | "white";
|
|
453
|
+
export type PhotoSize = "low" | "medium" | "high" | "max";
|
|
454
|
+
export type PhotoMode = "photo" | "text";
|
|
455
|
+
export type PhotoTransferMethod = "auto" | "direct" | "ble";
|
|
456
|
+
export type ButtonPhotoSize = "low" | "medium" | "high" | "max";
|
|
457
|
+
/**
|
|
458
|
+
* @deprecated Sticky action-button photo presets via {@link BluetoothSdkPublicModule.setPhotoCaptureDefaults}
|
|
459
|
+
* are deprecated. Prefer per-request {@link BluetoothSdkPublicModule.requestPhoto} options
|
|
460
|
+
* (e.g. `mode: "text"` for text sensor size/crop, or explicit `aeExposureDivisor`) instead of
|
|
461
|
+
* persisting button-photo tuning on the glasses.
|
|
462
|
+
*/
|
|
463
|
+
export type PhotoCaptureDefaults = {
|
|
464
|
+
size?: PhotoSize;
|
|
465
|
+
/** ZSL preview buffering for physical camera-button photos. */
|
|
466
|
+
zsl?: boolean;
|
|
467
|
+
/** MFNR still capture for physical camera-button photos. */
|
|
468
|
+
mfnr?: boolean;
|
|
469
|
+
noiseReduction?: boolean;
|
|
470
|
+
edgeEnhancement?: boolean;
|
|
471
|
+
ispDigitalGain?: number;
|
|
472
|
+
ispAnalogGain?: string;
|
|
473
|
+
aeExposureDivisor?: number;
|
|
474
|
+
isoCap?: number;
|
|
475
|
+
compress?: PhotoCompression;
|
|
476
|
+
sound?: boolean;
|
|
477
|
+
/** When true, clears stored NR/edge/ISP presets on the glasses before applying other fields. */
|
|
478
|
+
resetCaptureTuning?: boolean;
|
|
479
|
+
};
|
|
480
|
+
export type PhotoCompression = "none" | "medium" | "heavy";
|
|
481
|
+
export type VideoRecordingDefaults = {
|
|
482
|
+
width: number;
|
|
483
|
+
height: number;
|
|
484
|
+
fps: number;
|
|
485
|
+
};
|
|
486
|
+
/**
|
|
487
|
+
* Optional per-recording video settings for {@link startVideoRecording}. When
|
|
488
|
+
* omitted, the glasses fall back to their saved video recording defaults. Any
|
|
489
|
+
* field left undefined is omitted from the BLE command (glasses default applies).
|
|
490
|
+
*/
|
|
491
|
+
export interface VideoRecordingSettings {
|
|
492
|
+
width?: number;
|
|
493
|
+
height?: number;
|
|
494
|
+
fps?: number;
|
|
495
|
+
/**
|
|
496
|
+
* Optional auto-stop timer in minutes, sent on `start_video_recording`.
|
|
497
|
+
* `0` (the default) means record until stopped or interrupted
|
|
498
|
+
* (battery/storage/thermal/error).
|
|
499
|
+
*/
|
|
500
|
+
maxRecordingTimeMinutes?: number;
|
|
501
|
+
}
|
|
502
|
+
export declare const DeviceModels: {
|
|
503
|
+
readonly Simulated: "Simulated Glasses";
|
|
504
|
+
readonly G1: "Even Realities G1";
|
|
505
|
+
readonly G2: "Even Realities G2";
|
|
506
|
+
readonly MentraLive: "Mentra Live";
|
|
507
|
+
readonly MentraNex: "Mentra Display";
|
|
508
|
+
readonly Mach1: "Mentra Mach1";
|
|
509
|
+
readonly Z100: "Vuzix Z100";
|
|
510
|
+
readonly Frame: "Brilliant Frame";
|
|
511
|
+
readonly Nimo: "NIMO";
|
|
512
|
+
readonly Ar99: "AR99";
|
|
513
|
+
readonly R1: "Even Realities R1";
|
|
514
|
+
};
|
|
515
|
+
export type DeviceModel = (typeof DeviceModels)[keyof typeof DeviceModels];
|
|
516
|
+
export type ObservableStoreCategory = "glasses" | "bluetooth" | "core";
|
|
517
|
+
export type DashboardMenuItem = {
|
|
518
|
+
title: string;
|
|
519
|
+
packageName: string;
|
|
520
|
+
values?: Record<string, unknown>;
|
|
521
|
+
};
|
|
522
|
+
export declare const CAMERA_FOV_MIN = 62;
|
|
523
|
+
export declare const CAMERA_FOV_MAX = 118;
|
|
524
|
+
export declare const CAMERA_FOV_DEFAULT = 118;
|
|
525
|
+
export type CameraRoiPosition = "center" | "bottom" | "top";
|
|
526
|
+
export type CameraRoiPositionValue = 0 | 1 | 2;
|
|
527
|
+
export type CameraFovPreset = "narrow" | "standard" | "wide";
|
|
528
|
+
export type CameraFovRequest = {
|
|
529
|
+
fov: number;
|
|
530
|
+
roiPosition?: CameraRoiPosition;
|
|
531
|
+
} | {
|
|
532
|
+
preset: CameraFovPreset;
|
|
533
|
+
};
|
|
534
|
+
export type CameraFovResult = {
|
|
535
|
+
requestId: string;
|
|
536
|
+
fov: number;
|
|
537
|
+
roiPosition: CameraRoiPosition;
|
|
538
|
+
timestamp: number;
|
|
539
|
+
};
|
|
540
|
+
export type CameraFovOverrideRequest = CameraFovRequest & {
|
|
541
|
+
/** Phone-owned lease used to make delayed releases safe. */
|
|
542
|
+
leaseId: string;
|
|
543
|
+
/** Safety TTL; refresh the same lease/configuration to extend without a HAL restart. */
|
|
544
|
+
ttlMs?: number;
|
|
545
|
+
};
|
|
546
|
+
export type CameraFovSetting = {
|
|
547
|
+
fov: number;
|
|
548
|
+
roiPosition: CameraRoiPositionValue;
|
|
549
|
+
};
|
|
550
|
+
type NativeCameraFovSetting = {
|
|
551
|
+
fov: number;
|
|
552
|
+
roi_position: CameraRoiPositionValue;
|
|
553
|
+
};
|
|
554
|
+
export type MicPreference = "auto" | "phone" | "glasses" | "bluetooth";
|
|
555
|
+
export type MicMode = "phone" | "glasses" | "bluetoothClassic" | "bluetooth";
|
|
556
|
+
export type PhotoRequestParams = {
|
|
557
|
+
requestId?: string;
|
|
558
|
+
appId?: string;
|
|
559
|
+
size: PhotoSize;
|
|
560
|
+
mode?: PhotoMode;
|
|
561
|
+
/** `direct` disables BLE fallback; `ble` skips direct upload and forces phone-relayed transfer. */
|
|
562
|
+
transferMethod?: PhotoTransferMethod;
|
|
563
|
+
webhookUrl: string | null;
|
|
564
|
+
authToken: string | null;
|
|
565
|
+
compress: PhotoCompression;
|
|
566
|
+
save?: boolean;
|
|
567
|
+
sound: boolean;
|
|
568
|
+
exposureTimeNs?: number | null;
|
|
569
|
+
/** Sensor ISO for this capture only. Only used when exposureTimeNs enables manual exposure. */
|
|
570
|
+
iso?: number | null;
|
|
571
|
+
/** After AE convergence, divide metered exposure by this factor (scan mode). */
|
|
572
|
+
aeExposureDivisor?: number;
|
|
573
|
+
/** Cap ISO after AE metering (scan mode). */
|
|
574
|
+
isoCap?: number;
|
|
575
|
+
/** Requested on wire; glasses may log not_implemented. */
|
|
576
|
+
noiseReduction?: boolean;
|
|
577
|
+
edgeEnhancement?: boolean;
|
|
578
|
+
/** ZSL buffering. Forced off for manual/scan stills because fixed sensor controls take priority. */
|
|
579
|
+
zsl?: boolean;
|
|
580
|
+
/** MFNR still capture. Forced off for manual/scan stills because fixed sensor controls take priority. */
|
|
581
|
+
mfnr?: boolean;
|
|
582
|
+
ispDigitalGain?: number;
|
|
583
|
+
ispAnalogGain?: string;
|
|
584
|
+
};
|
|
585
|
+
export type WarmUpCameraParams = {
|
|
586
|
+
/** Supply this when the owner needs to call stopCameraWarmUp during teardown. */
|
|
587
|
+
requestId?: string;
|
|
588
|
+
size: PhotoSize;
|
|
589
|
+
mode?: PhotoMode;
|
|
590
|
+
exposureTimeNs?: number | null;
|
|
591
|
+
/** Ready-state hold; defaults to 15 seconds and is capped at 60 seconds by ASG. */
|
|
592
|
+
durationMs?: number;
|
|
593
|
+
/** ZSL preview buffering for the warm-up session. */
|
|
594
|
+
zsl?: boolean;
|
|
595
|
+
/** MFNR still capture for the warm-up session. */
|
|
596
|
+
mfnr?: boolean;
|
|
597
|
+
};
|
|
598
|
+
export type StreamVideoConfig = {
|
|
599
|
+
width?: number;
|
|
600
|
+
height?: number;
|
|
601
|
+
bitrate?: number;
|
|
602
|
+
fps?: number;
|
|
603
|
+
};
|
|
604
|
+
export type StreamAudioConfig = {
|
|
605
|
+
bitrate?: number;
|
|
606
|
+
sampleRate?: number;
|
|
607
|
+
echoCancellation?: boolean;
|
|
608
|
+
noiseSuppression?: boolean;
|
|
609
|
+
};
|
|
610
|
+
export type StreamStartRequest = {
|
|
611
|
+
type?: "start_stream";
|
|
612
|
+
streamUrl: string;
|
|
613
|
+
streamId?: string;
|
|
614
|
+
sound?: boolean;
|
|
615
|
+
video?: StreamVideoConfig;
|
|
616
|
+
audio?: StreamAudioConfig;
|
|
617
|
+
};
|
|
618
|
+
export type StreamKeepAliveRequest = {
|
|
619
|
+
type?: "keep_stream_alive";
|
|
620
|
+
streamId: string;
|
|
621
|
+
ackId: string;
|
|
622
|
+
};
|
|
623
|
+
export type PairFailureEvent = {
|
|
624
|
+
type: "pair_failure";
|
|
625
|
+
error: string;
|
|
626
|
+
};
|
|
627
|
+
export type PairingInfoEvent = {
|
|
628
|
+
had_previous_bond: boolean;
|
|
629
|
+
pairing_code?: string;
|
|
630
|
+
classic_bond_ready?: boolean;
|
|
631
|
+
secure_pairing_capable?: boolean;
|
|
632
|
+
protocol_version?: number;
|
|
633
|
+
};
|
|
634
|
+
export type EnteringPairingModeEvent = {
|
|
635
|
+
window_ms: number;
|
|
636
|
+
reason?: string;
|
|
637
|
+
};
|
|
638
|
+
export type OwnerReplacedEvent = {
|
|
639
|
+
reason: string;
|
|
640
|
+
};
|
|
641
|
+
export type AudioPairingNeededEvent = {
|
|
642
|
+
type: "audio_pairing_needed";
|
|
643
|
+
deviceName: string;
|
|
644
|
+
};
|
|
645
|
+
export type AudioConnectedEvent = {
|
|
646
|
+
type: "audio_connected";
|
|
647
|
+
deviceName: string;
|
|
648
|
+
};
|
|
649
|
+
export type AudioDisconnectedEvent = {
|
|
650
|
+
type: "audio_disconnected";
|
|
651
|
+
};
|
|
652
|
+
export type SaveSettingEvent = {
|
|
653
|
+
type: "save_setting";
|
|
654
|
+
key: string;
|
|
655
|
+
value: any;
|
|
656
|
+
};
|
|
657
|
+
export type WsTextEvent = {
|
|
658
|
+
type: "ws_text";
|
|
659
|
+
text: string;
|
|
660
|
+
};
|
|
661
|
+
export type WsBinEvent = {
|
|
662
|
+
type: "ws_bin";
|
|
663
|
+
base64: string;
|
|
664
|
+
};
|
|
665
|
+
export type MicPcmEvent = {
|
|
666
|
+
type: "mic_pcm";
|
|
667
|
+
pcm: ArrayBuffer;
|
|
668
|
+
sampleRate: 16000;
|
|
669
|
+
bitsPerSample: 16;
|
|
670
|
+
channels: 1;
|
|
671
|
+
encoding: "pcm_s16le";
|
|
672
|
+
voiceActivityDetectionEnabled: boolean;
|
|
673
|
+
};
|
|
674
|
+
export type MicLc3Event = {
|
|
675
|
+
type: "mic_lc3";
|
|
676
|
+
lc3: ArrayBuffer;
|
|
677
|
+
sampleRate: 16000;
|
|
678
|
+
channels: 1;
|
|
679
|
+
encoding: "lc3";
|
|
680
|
+
frameDurationMs: 10;
|
|
681
|
+
frameSizeBytes: number;
|
|
682
|
+
bitrate: number;
|
|
683
|
+
packetizedFromGlasses: boolean;
|
|
684
|
+
voiceActivityDetectionEnabled: boolean;
|
|
685
|
+
};
|
|
686
|
+
/** Native glasses-microphone diagnostics emitted when the SDK detects a transport or decode issue. */
|
|
687
|
+
export type MicHealthEvent = {
|
|
688
|
+
type: "mic_health";
|
|
689
|
+
reason: "sequence_gap" | "decode_failure";
|
|
690
|
+
sequenceGapEvents: number;
|
|
691
|
+
decodeFailures: number;
|
|
692
|
+
lastLc3ReceivedAt?: number;
|
|
693
|
+
lastPcmProducedAt?: number;
|
|
694
|
+
timestamp: number;
|
|
695
|
+
};
|
|
696
|
+
export type StreamStatusLifecycleState = "initializing" | "streaming" | "stopping" | "stopped";
|
|
697
|
+
export type StreamStatusReconnectState = "reconnecting" | "reconnected" | "reconnect_failed";
|
|
698
|
+
export type StreamStatusState = StreamStatusLifecycleState | StreamStatusReconnectState | "error";
|
|
699
|
+
/** Effective stream settings reported by the glasses after defaults and clamps. */
|
|
700
|
+
export type StreamResolvedConfig = {
|
|
701
|
+
transport?: "rtmp" | "srt" | "whip";
|
|
702
|
+
video?: {
|
|
703
|
+
/** Encoded output width sent to the stream endpoint. */
|
|
704
|
+
width: number;
|
|
705
|
+
/** Encoded output height sent to the stream endpoint. */
|
|
706
|
+
height: number;
|
|
707
|
+
/** Native camera buffer width selected before crop/downscale. */
|
|
708
|
+
captureWidth?: number;
|
|
709
|
+
/** Native camera buffer height selected before crop/downscale. */
|
|
710
|
+
captureHeight?: number;
|
|
711
|
+
/** Encoded video bitrate in bits per second. */
|
|
712
|
+
bitrate: number;
|
|
713
|
+
/** Resolved capture/encode frame rate. */
|
|
714
|
+
fps: number;
|
|
715
|
+
};
|
|
716
|
+
audio?: {
|
|
717
|
+
/** Encoded audio bitrate in bits per second. */
|
|
718
|
+
bitrate?: number;
|
|
719
|
+
/** Audio sample rate in Hz. */
|
|
720
|
+
sampleRate?: number;
|
|
721
|
+
echoCancellation?: boolean;
|
|
722
|
+
noiseSuppression?: boolean;
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
/** Live encoder and device telemetry emitted periodically by supported glasses firmware. */
|
|
726
|
+
export type StreamLiveStats = {
|
|
727
|
+
/** Current encoded video bitrate in bits per second. */
|
|
728
|
+
bitrate?: number;
|
|
729
|
+
/** Current encode frame rate. */
|
|
730
|
+
fps?: number;
|
|
731
|
+
droppedFrames?: number;
|
|
732
|
+
/** Seconds since the stream started. */
|
|
733
|
+
duration?: number;
|
|
734
|
+
/** Device temperature in 闂佺娅i悡? if the hardware reports it. */
|
|
735
|
+
temperatureC?: number;
|
|
736
|
+
};
|
|
737
|
+
type StreamStatusCommon = {
|
|
738
|
+
type: "stream_status";
|
|
739
|
+
streamId?: string;
|
|
740
|
+
timestamp?: number;
|
|
741
|
+
resolvedConfig?: StreamResolvedConfig;
|
|
742
|
+
stats?: StreamLiveStats;
|
|
743
|
+
};
|
|
744
|
+
export type StreamStatusEvent = (StreamStatusCommon & {
|
|
745
|
+
kind: "lifecycle";
|
|
746
|
+
status: StreamStatusLifecycleState;
|
|
747
|
+
}) | (StreamStatusCommon & {
|
|
748
|
+
kind: "reconnect";
|
|
749
|
+
status: "reconnecting";
|
|
750
|
+
attempt: number;
|
|
751
|
+
maxAttempts: number;
|
|
752
|
+
reason: string;
|
|
753
|
+
}) | (StreamStatusCommon & {
|
|
754
|
+
kind: "reconnect";
|
|
755
|
+
status: "reconnected";
|
|
756
|
+
attempt: number;
|
|
757
|
+
}) | (StreamStatusCommon & {
|
|
758
|
+
kind: "reconnect";
|
|
759
|
+
status: "reconnect_failed";
|
|
760
|
+
maxAttempts: number;
|
|
761
|
+
}) | (StreamStatusCommon & {
|
|
762
|
+
kind: "error";
|
|
763
|
+
status: "error";
|
|
764
|
+
errorDetails: string;
|
|
765
|
+
}) | (StreamStatusCommon & {
|
|
766
|
+
kind: "snapshot";
|
|
767
|
+
status: "streaming" | "reconnecting" | "stopped";
|
|
768
|
+
streaming: boolean;
|
|
769
|
+
reconnecting: boolean;
|
|
770
|
+
attempt?: number;
|
|
771
|
+
});
|
|
772
|
+
export type KeepAliveAckEvent = {
|
|
773
|
+
type: "keep_alive_ack";
|
|
774
|
+
streamId: string;
|
|
775
|
+
ackId: string;
|
|
776
|
+
timestamp?: number;
|
|
777
|
+
};
|
|
778
|
+
export type MtkUpdateCompleteEvent = {
|
|
779
|
+
type: "mtk_update_complete";
|
|
780
|
+
message: string;
|
|
781
|
+
timestamp: number;
|
|
782
|
+
};
|
|
783
|
+
/**
|
|
784
|
+
* The glasses process restarted while the BES kept the BLE link alive (its `sid`
|
|
785
|
+
* changed, or first appeared after an update from a pre-sid build). There is no
|
|
786
|
+
* physical disconnect for this — treat it as the logical reconnect edge.
|
|
787
|
+
*/
|
|
788
|
+
export type GlassesSessionChangedEvent = {
|
|
789
|
+
type: "glasses_session_changed";
|
|
790
|
+
previous_sid: string;
|
|
791
|
+
sid: string;
|
|
792
|
+
};
|
|
793
|
+
/** @deprecated Glasses no longer emit ota_progress; use {@link OtaStatusEvent} and status-store mapping. */
|
|
794
|
+
export type OtaProgressEvent = {
|
|
795
|
+
type: "ota_progress";
|
|
796
|
+
stage?: OtaStage;
|
|
797
|
+
status?: OtaProgressStatus;
|
|
798
|
+
progress?: number;
|
|
799
|
+
bytes_downloaded?: number;
|
|
800
|
+
total_bytes?: number;
|
|
801
|
+
current_update?: string;
|
|
802
|
+
error_message?: string;
|
|
803
|
+
};
|
|
804
|
+
export type OtaStartAckEvent = {
|
|
805
|
+
type: "ota_start_ack";
|
|
806
|
+
timestamp: number;
|
|
807
|
+
};
|
|
808
|
+
export type OtaStatusEvent = {
|
|
809
|
+
type: "ota_status";
|
|
810
|
+
session_id: string;
|
|
811
|
+
total_steps: number;
|
|
812
|
+
current_step: number;
|
|
813
|
+
step_type: "apk" | "mtk" | "bes";
|
|
814
|
+
phase: "download" | "install";
|
|
815
|
+
step_percent: number;
|
|
816
|
+
overall_percent: number;
|
|
817
|
+
status: "in_progress" | "step_complete" | "complete" | "failed" | "idle";
|
|
818
|
+
error_message?: string;
|
|
819
|
+
};
|
|
820
|
+
export type OtaQueryResult = OtaStatusEvent;
|
|
821
|
+
/** Nex BLE protobuf trace (NexEventUtils); payload matches native Map keys. */
|
|
822
|
+
export type BleCommandTraceEvent = {
|
|
823
|
+
command: string;
|
|
824
|
+
commandText: string;
|
|
825
|
+
timestamp: number;
|
|
826
|
+
};
|
|
827
|
+
export type MiniappSelectedEvent = {
|
|
828
|
+
type: "miniapp_selected";
|
|
829
|
+
packageName: string;
|
|
830
|
+
};
|
|
831
|
+
export type BluetoothSdkInternalEvent = Parameters<BluetoothSdkModuleEvents[keyof BluetoothSdkModuleEvents]>[0];
|
|
832
|
+
export type BluetoothSdkModuleEvents = {
|
|
833
|
+
glasses_status: (changed: Partial<GlassesStatus>) => void;
|
|
834
|
+
bluetooth_status: (changed: Partial<BluetoothStatus>) => void;
|
|
835
|
+
log: (event: LogEvent) => void;
|
|
836
|
+
device_discovered: (device: Device) => void;
|
|
837
|
+
default_device_changed: (event: {
|
|
838
|
+
device?: Device;
|
|
839
|
+
}) => void;
|
|
840
|
+
glasses_not_ready: (event: GlassesNotReadyEvent) => void;
|
|
841
|
+
button_press: (event: ButtonPressEvent) => void;
|
|
842
|
+
touch_event: (event: TouchEvent) => void;
|
|
843
|
+
accel_event: (event: AccelEvent) => void;
|
|
844
|
+
compass_heading: (event: CompassHeadingEvent) => void;
|
|
845
|
+
compass_calibration: (event: CompassCalibrationEvent) => void;
|
|
846
|
+
navigation_mode_change: (event: NavigationModeEvent) => void;
|
|
847
|
+
navigation_view_change: (event: NavigationViewEvent) => void;
|
|
848
|
+
head_up: (event: HeadUpEvent) => void;
|
|
849
|
+
voice_activity_detection_status: (event: VoiceActivityDetectionStatusEvent) => void;
|
|
850
|
+
speaking_status: (event: SpeakingStatusEvent) => void;
|
|
851
|
+
battery_status: (event: BatteryStatusEvent) => void;
|
|
852
|
+
local_transcription: (event: LocalTranscriptionEvent) => void;
|
|
853
|
+
speaker_detected: (event: SpeakerDetectedEvent) => void;
|
|
854
|
+
speaker_enroll_progress: (event: SpeakerEnrollProgressEvent) => void;
|
|
855
|
+
speaker_enroll_result: (event: SpeakerEnrollResultEvent) => void;
|
|
856
|
+
phone_notification: (event: PhoneNotificationEvent) => void;
|
|
857
|
+
phone_notification_dismissed: (event: PhoneNotificationDismissedEvent) => void;
|
|
858
|
+
wifi_status_change: (event: WifiStatusChangeEvent) => void;
|
|
859
|
+
wifi_scan_result: (event: WifiScanResultEvent) => void;
|
|
860
|
+
hotspot_status_change: (event: HotspotStatusChangeEvent) => void;
|
|
861
|
+
hotspot_error: (event: HotspotErrorEvent) => void;
|
|
862
|
+
photo_response: (event: PhotoResponseEvent) => void;
|
|
863
|
+
photo_status: (event: PhotoStatusEvent) => void;
|
|
864
|
+
camera_status: (event: CameraStatusEvent) => void;
|
|
865
|
+
video_recording_status: (event: VideoRecordingStatusEvent) => void;
|
|
866
|
+
media_success: (event: MediaUploadSuccessEvent) => void;
|
|
867
|
+
media_error: (event: MediaUploadErrorEvent) => void;
|
|
868
|
+
gallery_status: (event: GalleryStatusEvent) => void;
|
|
869
|
+
compatible_glasses_search_stop: (event: CompatibleGlassesSearchStopEvent) => void;
|
|
870
|
+
heartbeat_sent: (event: HeartbeatSentEvent) => void;
|
|
871
|
+
heartbeat_received: (event: HeartbeatReceivedEvent) => void;
|
|
872
|
+
swipe_volume_status: (event: SwipeVolumeStatusEvent) => void;
|
|
873
|
+
switch_status: (event: SwitchStatusEvent) => void;
|
|
874
|
+
rgb_led_control_response: (event: RgbLedControlResponseEvent) => void;
|
|
875
|
+
settings_ack: (event: SettingsAckEvent) => void;
|
|
876
|
+
pair_failure: (event: PairFailureEvent) => void;
|
|
877
|
+
pairing_info: (event: PairingInfoEvent) => void;
|
|
878
|
+
entering_pairing_mode: (event: EnteringPairingModeEvent) => void;
|
|
879
|
+
owner_replaced: (event: OwnerReplacedEvent) => void;
|
|
880
|
+
audio_pairing_needed: (event: AudioPairingNeededEvent) => void;
|
|
881
|
+
audio_connected: (event: AudioConnectedEvent) => void;
|
|
882
|
+
audio_disconnected: (event: AudioDisconnectedEvent) => void;
|
|
883
|
+
save_setting: (event: SaveSettingEvent) => void;
|
|
884
|
+
ws_text: (event: WsTextEvent) => void;
|
|
885
|
+
ws_bin: (event: WsBinEvent) => void;
|
|
886
|
+
mic_pcm: (event: MicPcmEvent) => void;
|
|
887
|
+
mic_lc3: (event: MicLc3Event) => void;
|
|
888
|
+
mic_health: (event: MicHealthEvent) => void;
|
|
889
|
+
stream_status: (event: StreamStatusEvent) => void;
|
|
890
|
+
keep_alive_ack: (event: KeepAliveAckEvent) => void;
|
|
891
|
+
mtk_update_complete: (event: MtkUpdateCompleteEvent) => void;
|
|
892
|
+
glasses_session_changed: (event: GlassesSessionChangedEvent) => void;
|
|
893
|
+
ota_start_ack: (event: OtaStartAckEvent) => void;
|
|
894
|
+
ota_status: (event: OtaStatusEvent) => void;
|
|
895
|
+
ar99_ota_status: (event: Ar99OtaStatusEvent) => void;
|
|
896
|
+
g2_firmware_flash_progress: (event: G2FirmwareFlashProgressEvent) => void;
|
|
897
|
+
version_info: (event: VersionInfoEvent) => void;
|
|
898
|
+
send_command_to_ble: (event: BleCommandTraceEvent) => void;
|
|
899
|
+
receive_command_from_ble: (event: BleCommandTraceEvent) => void;
|
|
900
|
+
miniapp_selected: (event: MiniappSelectedEvent) => void;
|
|
901
|
+
extraction_progress: (event: ExtractionProgressEvent) => void;
|
|
902
|
+
};
|
|
903
|
+
export interface ExtractionProgressEvent {
|
|
904
|
+
percentage: number;
|
|
905
|
+
bytesRead: number;
|
|
906
|
+
totalBytes: number;
|
|
907
|
+
}
|
|
908
|
+
export interface Ar99OtaStatusEvent {
|
|
909
|
+
type: "ar99_ota_status";
|
|
910
|
+
phase: string;
|
|
911
|
+
progress: number;
|
|
912
|
+
offset: number;
|
|
913
|
+
total: number;
|
|
914
|
+
errorMessage?: string;
|
|
915
|
+
error_message?: string;
|
|
916
|
+
}
|
|
917
|
+
export interface PhoneNotificationEvent {
|
|
918
|
+
notificationId: string;
|
|
919
|
+
app: string;
|
|
920
|
+
title: string;
|
|
921
|
+
content: string;
|
|
922
|
+
priority: string;
|
|
923
|
+
timestamp: number;
|
|
924
|
+
packageName: string;
|
|
925
|
+
}
|
|
926
|
+
export interface PhoneNotificationDismissedEvent {
|
|
927
|
+
notificationId: string;
|
|
928
|
+
notificationKey: string;
|
|
929
|
+
packageName: string;
|
|
930
|
+
timestamp: number;
|
|
931
|
+
}
|
|
932
|
+
export type PublicGlassesStatus = Omit<GlassesStatus, "otaUpdateAvailable" | "otaProgress" | "otaInProgress" | "otaVersionUrl">;
|
|
933
|
+
export type PublicBluetoothStatus = Pick<BluetoothStatus, "searching" | "searchingController" | "systemMicUnavailable" | "micRanking" | "currentMic" | "searchResults" | "wifiScanResults" | "lastLog" | "otherBtConnected" | "galleryModeEnabled">;
|
|
934
|
+
export type BluetoothSdkEventMap = {
|
|
935
|
+
log: LogEvent;
|
|
936
|
+
device_discovered: Device;
|
|
937
|
+
default_device_changed: {
|
|
938
|
+
device?: Device;
|
|
939
|
+
};
|
|
940
|
+
glasses_not_ready: GlassesNotReadyEvent;
|
|
941
|
+
button_press: ButtonPressEvent;
|
|
942
|
+
touch_event: TouchEvent;
|
|
943
|
+
accel_event: AccelEvent;
|
|
944
|
+
head_up: HeadUpEvent;
|
|
945
|
+
voice_activity_detection_status: VoiceActivityDetectionStatusEvent;
|
|
946
|
+
speaking_status: SpeakingStatusEvent;
|
|
947
|
+
battery_status: BatteryStatusEvent;
|
|
948
|
+
local_transcription: LocalTranscriptionEvent;
|
|
949
|
+
wifi_status_change: WifiStatusChangeEvent;
|
|
950
|
+
wifi_scan_result: WifiScanResultEvent;
|
|
951
|
+
hotspot_status_change: HotspotStatusChangeEvent;
|
|
952
|
+
hotspot_error: HotspotErrorEvent;
|
|
953
|
+
photo_response: PhotoResponseEvent;
|
|
954
|
+
photo_status: PhotoStatusEvent;
|
|
955
|
+
camera_status: CameraStatusEvent;
|
|
956
|
+
video_recording_status: VideoRecordingStatusEvent;
|
|
957
|
+
media_success: MediaUploadSuccessEvent;
|
|
958
|
+
media_error: MediaUploadErrorEvent;
|
|
959
|
+
gallery_status: GalleryStatusEvent;
|
|
960
|
+
compatible_glasses_search_stop: CompatibleGlassesSearchStopEvent;
|
|
961
|
+
swipe_volume_status: SwipeVolumeStatusEvent;
|
|
962
|
+
switch_status: SwitchStatusEvent;
|
|
963
|
+
rgb_led_control_response: RgbLedControlResponseEvent;
|
|
964
|
+
settings_ack: SettingsAckEvent;
|
|
965
|
+
pair_failure: PairFailureEvent;
|
|
966
|
+
pairing_info: PairingInfoEvent;
|
|
967
|
+
entering_pairing_mode: EnteringPairingModeEvent;
|
|
968
|
+
owner_replaced: OwnerReplacedEvent;
|
|
969
|
+
audio_pairing_needed: AudioPairingNeededEvent;
|
|
970
|
+
audio_connected: AudioConnectedEvent;
|
|
971
|
+
audio_disconnected: AudioDisconnectedEvent;
|
|
972
|
+
mic_pcm: MicPcmEvent;
|
|
973
|
+
mic_lc3: MicLc3Event;
|
|
974
|
+
mic_health: MicHealthEvent;
|
|
975
|
+
stream_status: StreamStatusEvent;
|
|
976
|
+
/** Mentra Live MTK updater completed and the glasses are about to restart. */
|
|
977
|
+
mtk_update_complete: MtkUpdateCompleteEvent;
|
|
978
|
+
/** The ASG process restarted while the BES kept the BLE connection alive. */
|
|
979
|
+
glasses_session_changed: GlassesSessionChangedEvent;
|
|
980
|
+
ota_start_ack: OtaStartAckEvent;
|
|
981
|
+
ota_status: OtaStatusEvent;
|
|
982
|
+
ar99_ota_status: Ar99OtaStatusEvent;
|
|
983
|
+
g2_firmware_flash_progress: G2FirmwareFlashProgressEvent;
|
|
984
|
+
version_info: VersionInfoEvent;
|
|
985
|
+
extraction_progress: ExtractionProgressEvent;
|
|
986
|
+
};
|
|
987
|
+
export type BluetoothSdkEventName = keyof BluetoothSdkEventMap;
|
|
988
|
+
export type BluetoothSdkEventListener<EventName extends BluetoothSdkEventName> = (event: BluetoothSdkEventMap[EventName]) => void;
|
|
989
|
+
export type BluetoothSdkSubscription = {
|
|
990
|
+
remove(): void;
|
|
991
|
+
};
|
|
992
|
+
export type BluetoothSdkEvent = BluetoothSdkEventMap[BluetoothSdkEventName];
|
|
993
|
+
export interface BluetoothSdkPublicModule {
|
|
994
|
+
addListener<EventName extends BluetoothSdkEventName>(eventName: EventName, listener: BluetoothSdkEventListener<EventName>): BluetoothSdkSubscription;
|
|
995
|
+
/** Read an immutable snapshot of the current glasses state. */
|
|
996
|
+
getGlassesStatus(): Promise<PublicGlassesStatus>;
|
|
997
|
+
/** Read an immutable snapshot of the phone Bluetooth adapter state. */
|
|
998
|
+
getBluetoothStatus(): Promise<PublicBluetoothStatus>;
|
|
999
|
+
/** Observe immutable glasses-state patches. Returns an unsubscribe function. */
|
|
1000
|
+
subscribeGlassesStatus(listener: (changed: Partial<PublicGlassesStatus>) => void): () => void;
|
|
1001
|
+
/** Observe immutable Bluetooth-state patches. Returns an unsubscribe function. */
|
|
1002
|
+
subscribeBluetoothStatus(listener: (changed: Partial<PublicBluetoothStatus>) => void): () => void;
|
|
1003
|
+
getDefaultDevice(): Promise<Device | null>;
|
|
1004
|
+
setDefaultDevice(device: Device | null): Promise<void>;
|
|
1005
|
+
clearDefaultDevice(): Promise<void>;
|
|
1006
|
+
startScan(model: DeviceModel): Promise<void>;
|
|
1007
|
+
stopScan(): Promise<void>;
|
|
1008
|
+
scan(options: ScanOptions): Promise<Device[]>;
|
|
1009
|
+
scan(model: DeviceModel, options?: ScanModelOptions): Promise<Device[]>;
|
|
1010
|
+
connect(device: Device, options?: ConnectOptions): Promise<void>;
|
|
1011
|
+
connectDefault(options?: ConnectOptions): Promise<void>;
|
|
1012
|
+
cancelConnectionAttempt(): Promise<void>;
|
|
1013
|
+
disconnect(): Promise<void>;
|
|
1014
|
+
forget(): Promise<void>;
|
|
1015
|
+
displayText(text: string, x?: number, y?: number, size?: number): Promise<void>;
|
|
1016
|
+
clearDisplay(): Promise<void>;
|
|
1017
|
+
showDashboard(): Promise<void>;
|
|
1018
|
+
toggleHeadUp(): Promise<void>;
|
|
1019
|
+
/**
|
|
1020
|
+
* Open the glasses' built-in notification panel (same effect as the user
|
|
1021
|
+
* saying "Hey Even, show notifications"). G2 only; a no-op elsewhere.
|
|
1022
|
+
*/
|
|
1023
|
+
showNativeNotificationPanel(): Promise<void>;
|
|
1024
|
+
setDashboardPosition(height: number, depth: number): Promise<void>;
|
|
1025
|
+
setHeadUpAngle(angleDegrees: number): Promise<void>;
|
|
1026
|
+
setImuEnabled(enabled: boolean): Promise<void>;
|
|
1027
|
+
setScreenDisabled(disabled: boolean): Promise<void>;
|
|
1028
|
+
/** Keep legacy Mentra Live OTA sessions awake. Modern sessions normally do not require this. */
|
|
1029
|
+
ping(): Promise<void>;
|
|
1030
|
+
requestWifiScan(): Promise<WifiSearchResult[]>;
|
|
1031
|
+
sendWifiCredentials(ssid: string, password: string): Promise<WifiStatusChangeEvent>;
|
|
1032
|
+
forgetWifiNetwork(ssid: string): Promise<WifiStatusChangeEvent>;
|
|
1033
|
+
setHotspotState(enabled: boolean): Promise<HotspotStatusChangeEvent>;
|
|
1034
|
+
/** Set the glasses clock from the phone after an OTA clock-skew failure. */
|
|
1035
|
+
setSystemTime(timestampMs: number): Promise<void>;
|
|
1036
|
+
/** Enable or disable Wi-Fi ADB on Mentra Live (no-op on other devices). */
|
|
1037
|
+
setWifiAdbState(enabled: boolean): Promise<void>;
|
|
1038
|
+
setGalleryModeEnabled(enabled: boolean): Promise<SettingsAckSuccessEvent>;
|
|
1039
|
+
setVoiceActivityDetectionEnabled(enabled: boolean): Promise<void>;
|
|
1040
|
+
setLoudnessGateEnabled(enabled: boolean): Promise<void>;
|
|
1041
|
+
/**
|
|
1042
|
+
* @deprecated Sticky action-button photo presets are deprecated. Prefer per-request
|
|
1043
|
+
* `requestPhoto(...)` options (e.g. `mode: "text"` for text sensor size/crop, or explicit per-shot
|
|
1044
|
+
* fields). Still functional until removed in a future release.
|
|
1045
|
+
*/
|
|
1046
|
+
setPhotoCaptureDefaults(settings: PhotoCaptureDefaults): Promise<SettingsAckSuccessEvent>;
|
|
1047
|
+
setVideoRecordingDefaults(settings: VideoRecordingDefaults): Promise<SettingsAckSuccessEvent>;
|
|
1048
|
+
setMaxVideoRecordingDuration(minutes: number): Promise<SettingsAckSuccessEvent>;
|
|
1049
|
+
setCameraFov(request: CameraFovRequest): Promise<CameraFovResult>;
|
|
1050
|
+
/** One-way FOV command for legacy ASG clients that do not send settings acknowledgements. */
|
|
1051
|
+
setLegacyCameraFov(request: CameraFovRequest): Promise<CameraFovResult>;
|
|
1052
|
+
setCameraFovOverride(request: CameraFovOverrideRequest): Promise<CameraFovResult>;
|
|
1053
|
+
releaseCameraFovOverride(leaseId: string): Promise<SettingsAckSuccessEvent>;
|
|
1054
|
+
/**
|
|
1055
|
+
* Configure camera HAL tuning (ANR / gain) on Mentra Live glasses.
|
|
1056
|
+
*
|
|
1057
|
+
* The phone sends a {@code camera_tuning_config} BLE command; the glasses relay it as a
|
|
1058
|
+
* {@code camconfig} broadcast to the camera HAL so parameters take effect without a reboot.
|
|
1059
|
+
*
|
|
1060
|
+
* **Scan-mode convention**: call with `(false, false)` when activating scan mode to disable ANR
|
|
1061
|
+
* and pixsmart gain for sharper text/barcode captures. Call with `(true, true)` to restore
|
|
1062
|
+
* defaults when exiting scan mode.
|
|
1063
|
+
*
|
|
1064
|
+
* @param anrOn `true` = ANR enabled (default), `false` = ANR disabled
|
|
1065
|
+
* @param gainOn `true` = stock gain params (default), `false` = pixsmart gain-off params
|
|
1066
|
+
*/
|
|
1067
|
+
setCameraTuningConfig(anrOn: boolean, gainOn: boolean): Promise<SettingsAckSuccessEvent>;
|
|
1068
|
+
queryGalleryStatus(): Promise<GalleryStatusEvent>;
|
|
1069
|
+
requestPhoto(params: PhotoRequestParams): Promise<PhotoSuccessResponseEvent>;
|
|
1070
|
+
warmUpCamera(params: WarmUpCameraParams): Promise<CameraStatusEvent>;
|
|
1071
|
+
/** Release one request-owned warm-up. Opening requests reject with camera_warm_up_cancelled. */
|
|
1072
|
+
stopCameraWarmUp(requestId: string): Promise<void>;
|
|
1073
|
+
startVideoRecording(requestId: string, save: boolean, sound: boolean, settings?: VideoRecordingSettings): Promise<VideoRecordingStartedStatusEvent>;
|
|
1074
|
+
/**
|
|
1075
|
+
* Stop the active recording. When {@link webhookUrl} is provided, the glasses
|
|
1076
|
+
* upload the recorded video to it (multipart) using {@link authToken}. These
|
|
1077
|
+
* are supplied at stop time (not start) so the token is fresh when the upload
|
|
1078
|
+
* runs 闂?a recording can last arbitrarily long. An empty/omitted webhook keeps
|
|
1079
|
+
* the video on device (no upload).
|
|
1080
|
+
*/
|
|
1081
|
+
stopVideoRecording(requestId: string, webhookUrl?: string, authToken?: string): Promise<VideoRecordingStoppedStatusEvent>;
|
|
1082
|
+
/** Query the glasses for the current recording state and elapsed duration. */
|
|
1083
|
+
queryVideoRecordingStatus(requestId: string): Promise<VideoRecordingStatusEvent>;
|
|
1084
|
+
startStream(params: StreamStartRequest): Promise<StreamStatusEvent>;
|
|
1085
|
+
stopStream(): Promise<StreamStatusEvent>;
|
|
1086
|
+
setMicState(enabled: boolean, useGlassesMic?: boolean, sendTranscript?: boolean, sendLc3Data?: boolean): Promise<void>;
|
|
1087
|
+
setPreferredMic(preferredMic: MicPreference): Promise<void>;
|
|
1088
|
+
setOwnAppAudioPlaying(playing: boolean): Promise<void>;
|
|
1089
|
+
getGlassesMediaVolume(): Promise<GlassesMediaVolumeGetResult>;
|
|
1090
|
+
setGlassesMediaVolume(level: number): Promise<GlassesMediaVolumeSetResult>;
|
|
1091
|
+
rgbLedControl(requestId: string, packageName: string | null, action: RgbLedAction, color: RgbLedColor | null, onDurationMs: number, offDurationMs: number, count: number): Promise<RgbLedControlSuccessResponseEvent>;
|
|
1092
|
+
requestVersionInfo(): Promise<VersionInfoResult>;
|
|
1093
|
+
availableG2FirmwareArtifacts(): Promise<G2FirmwareArtifact[]>;
|
|
1094
|
+
startG2FirmwareFlash(target: G2FirmwareTarget): Promise<G2FirmwareFlashResult>;
|
|
1095
|
+
/**
|
|
1096
|
+
* Select the OTA manifest used by subsequent update checks and installs.
|
|
1097
|
+
* The URL may point at Glassly's hosted manifest or any customer-controlled HTTP(S) server.
|
|
1098
|
+
*/
|
|
1099
|
+
setOtaVersionUrl(otaVersionUrl: string): void;
|
|
1100
|
+
/** Return the configured or release-embedded OTA manifest URL. Rejects when a source build is unconfigured. */
|
|
1101
|
+
getOtaVersionUrl(): string;
|
|
1102
|
+
/** Fetch the configured OTA manifest and return whether any ASG/BES/MTK update is available. */
|
|
1103
|
+
checkForOtaUpdate(): Promise<boolean>;
|
|
1104
|
+
/** Return bundled release changelogs crossed between two coordinated product versions, newest first. */
|
|
1105
|
+
getReleaseChangelogs(fromVersion?: string | null, toVersion?: string | null): ReleaseChangelog[];
|
|
1106
|
+
/** Start OTA from the configured or explicitly supplied manifest URL. */
|
|
1107
|
+
startOtaUpdate(otaVersionUrl?: string | null): Promise<OtaStartAckEvent>;
|
|
1108
|
+
/** Query the active OTA session and return the correlated status response. */
|
|
1109
|
+
queryOtaStatus(): Promise<OtaQueryResult>;
|
|
1110
|
+
startAr99OtaFromFile(path: string): Promise<boolean>;
|
|
1111
|
+
cancelAr99Ota(): Promise<void>;
|
|
1112
|
+
sendAr99FactoryReset(): Promise<void>;
|
|
1113
|
+
buildAr99OtaSignature(secret: string, appName: string, currentVersion: string, serialNumber: string, nonce: string): string;
|
|
1114
|
+
setSttModelDetails(path: string, languageCode: string): Promise<void>;
|
|
1115
|
+
getSttModelPath(): Promise<string>;
|
|
1116
|
+
checkSttModelAvailable(): Promise<boolean>;
|
|
1117
|
+
validateSttModel(path: string): Promise<boolean>;
|
|
1118
|
+
extractTarBz2(sourcePath: string, destinationPath: string): Promise<boolean>;
|
|
1119
|
+
restartTranscriber(): Promise<void>;
|
|
1120
|
+
setTtsModelDetails(path: string, languageCode: string): Promise<void>;
|
|
1121
|
+
getTtsModelPath(): Promise<string>;
|
|
1122
|
+
getTtsModelLanguage(): Promise<string>;
|
|
1123
|
+
checkTtsModelAvailable(): Promise<boolean>;
|
|
1124
|
+
validateTtsModel(path: string): Promise<boolean>;
|
|
1125
|
+
generateTtsAudio(text: string, modelPath: string, outputPath: string, speakerId: number, speed: number): Promise<boolean>;
|
|
1126
|
+
}
|
|
1127
|
+
export type OtaStage = "download" | "install";
|
|
1128
|
+
export type OtaProgressStatus = "STARTED" | "PROGRESS" | "FINISHED" | "FAILED";
|
|
1129
|
+
export interface OtaStatus {
|
|
1130
|
+
sessionId: string;
|
|
1131
|
+
totalSteps: number;
|
|
1132
|
+
currentStep: number;
|
|
1133
|
+
stepType: "apk" | "mtk" | "bes";
|
|
1134
|
+
phase: "download" | "install";
|
|
1135
|
+
stepPercent: number;
|
|
1136
|
+
overallPercent: number;
|
|
1137
|
+
status: "in_progress" | "step_complete" | "complete" | "failed" | "idle";
|
|
1138
|
+
error?: string;
|
|
1139
|
+
}
|
|
1140
|
+
export interface OtaUpdateInfo {
|
|
1141
|
+
available: boolean;
|
|
1142
|
+
versionCode: number;
|
|
1143
|
+
versionName: string;
|
|
1144
|
+
updates: string[];
|
|
1145
|
+
totalSize: number;
|
|
1146
|
+
cacheReady?: boolean;
|
|
1147
|
+
/** Exact BES target selected from the OTA manifest, when a BES step is pending. */
|
|
1148
|
+
besVersion?: string;
|
|
1149
|
+
/** True when the APK step installs an older build than the glasses currently run (exact-pin manifests only). */
|
|
1150
|
+
isDowngrade?: boolean;
|
|
1151
|
+
}
|
|
1152
|
+
export interface ReleaseChangelog {
|
|
1153
|
+
/** Base production version, for example `3.1.0`. */
|
|
1154
|
+
version: string;
|
|
1155
|
+
/** Markdown body authored in `/changelogs/<version>.md`. */
|
|
1156
|
+
markdown: string;
|
|
1157
|
+
}
|
|
1158
|
+
export interface OtaProgress {
|
|
1159
|
+
stage: OtaStage;
|
|
1160
|
+
status: OtaProgressStatus;
|
|
1161
|
+
progress: number;
|
|
1162
|
+
bytesDownloaded: number;
|
|
1163
|
+
totalBytes: number;
|
|
1164
|
+
currentUpdate: string;
|
|
1165
|
+
errorMessage?: string;
|
|
1166
|
+
}
|
|
1167
|
+
export interface GlassesStatus {
|
|
1168
|
+
connection: GlassesConnectionStatus;
|
|
1169
|
+
micEnabled: boolean;
|
|
1170
|
+
voiceActivityDetectionEnabled: boolean;
|
|
1171
|
+
bluetoothClassicConnected: boolean;
|
|
1172
|
+
signalStrength: number;
|
|
1173
|
+
/** Milliseconds since epoch when signalStrength was last refreshed by the phone BLE stack. */
|
|
1174
|
+
signalStrengthUpdatedAt: number;
|
|
1175
|
+
deviceModel: string;
|
|
1176
|
+
androidVersion: string;
|
|
1177
|
+
firmwareVersion: string;
|
|
1178
|
+
besFirmwareVersion: string;
|
|
1179
|
+
mtkFirmwareVersion: string;
|
|
1180
|
+
bluetoothMacAddress: string;
|
|
1181
|
+
wifiMacAddress: string;
|
|
1182
|
+
leftMacAddress: string;
|
|
1183
|
+
rightMacAddress: string;
|
|
1184
|
+
buildNumber: string;
|
|
1185
|
+
/** Glasses System.currentTimeMillis() from last version_info (clock skew detection). */
|
|
1186
|
+
systemTimeMs?: number;
|
|
1187
|
+
otaVersionUrl: string;
|
|
1188
|
+
appVersion: string;
|
|
1189
|
+
/** Phone-served hotspot OTA protocol version; 0 means unsupported/legacy glasses. */
|
|
1190
|
+
hotspotOtaVersion: number;
|
|
1191
|
+
bluetoothName: string;
|
|
1192
|
+
serialNumber: string;
|
|
1193
|
+
style: string;
|
|
1194
|
+
color: string;
|
|
1195
|
+
/**
|
|
1196
|
+
* Scene canvas the connected firmware renders, when it differs from the
|
|
1197
|
+
* model profile (G2 Glassly CFW: 640×480 direct framebuffer). 0/absent ⇒
|
|
1198
|
+
* use the model's canvas.
|
|
1199
|
+
*/
|
|
1200
|
+
sceneCanvasWidth?: number;
|
|
1201
|
+
sceneCanvasHeight?: number;
|
|
1202
|
+
wifi: WifiStatus;
|
|
1203
|
+
batteryLevel: number;
|
|
1204
|
+
charging: boolean;
|
|
1205
|
+
caseBatteryLevel: number;
|
|
1206
|
+
caseCharging: boolean;
|
|
1207
|
+
caseOpen: boolean;
|
|
1208
|
+
caseRemoved: boolean;
|
|
1209
|
+
hotspot: HotspotStatus;
|
|
1210
|
+
otaUpdateAvailable: OtaUpdateInfo | null;
|
|
1211
|
+
otaProgress: OtaProgress | null;
|
|
1212
|
+
otaInProgress: boolean;
|
|
1213
|
+
controllerConnected: boolean;
|
|
1214
|
+
controllerFullyBooted: boolean;
|
|
1215
|
+
controllerMacAddress: string;
|
|
1216
|
+
controllerBatteryLevel: number;
|
|
1217
|
+
controllerSignalStrength: number;
|
|
1218
|
+
}
|
|
1219
|
+
export interface CoreDashboardMenuItem {
|
|
1220
|
+
name: string;
|
|
1221
|
+
packageName: string;
|
|
1222
|
+
running: boolean;
|
|
1223
|
+
}
|
|
1224
|
+
export interface CalendarEvent {
|
|
1225
|
+
title: string;
|
|
1226
|
+
location?: string;
|
|
1227
|
+
time: string;
|
|
1228
|
+
endDate: number;
|
|
1229
|
+
}
|
|
1230
|
+
export interface CoreSettings {
|
|
1231
|
+
menu_apps: CoreDashboardMenuItem[];
|
|
1232
|
+
calendar_events: CalendarEvent[];
|
|
1233
|
+
}
|
|
1234
|
+
export interface Device {
|
|
1235
|
+
/**
|
|
1236
|
+
* Stable app-facing key for this scan result, within the limits of the
|
|
1237
|
+
* platform identifier available to the SDK. Do not parse this value; use the
|
|
1238
|
+
* typed model, name, address, projectName, and rssi fields instead.
|
|
1239
|
+
*/
|
|
1240
|
+
id: string;
|
|
1241
|
+
model: DeviceModel;
|
|
1242
|
+
name: string;
|
|
1243
|
+
/** Platform address/identifier when available: Android Bluetooth address, iOS CoreBluetooth identifier. */
|
|
1244
|
+
address?: string;
|
|
1245
|
+
/** Optional AR99 project discriminator. Supported value: AR99. */
|
|
1246
|
+
projectName?: string;
|
|
1247
|
+
/**
|
|
1248
|
+
* Optional scan signal strength. It may be undefined at first discovery and
|
|
1249
|
+
* appear in a later scan update when the platform reports RSSI metadata.
|
|
1250
|
+
*/
|
|
1251
|
+
rssi?: number;
|
|
1252
|
+
/** Mentra Live: unit is currently in pairing mode (adv flag). */
|
|
1253
|
+
pairingMode?: boolean;
|
|
1254
|
+
/** Mentra Live: four-character hex spoken pairing code when available. */
|
|
1255
|
+
pairingCode?: string;
|
|
1256
|
+
/** Mentra Live: advertisement carries the secure-pairing capability trailer. */
|
|
1257
|
+
securePairingCapable?: boolean;
|
|
1258
|
+
}
|
|
1259
|
+
export interface ConnectOptions {
|
|
1260
|
+
saveAsDefault?: boolean;
|
|
1261
|
+
cancelExistingConnectionAttempt?: boolean;
|
|
1262
|
+
}
|
|
1263
|
+
export type ScanResultsCallback = (devices: Device[]) => void;
|
|
1264
|
+
export interface ScanOptions {
|
|
1265
|
+
model: DeviceModel;
|
|
1266
|
+
/** Defaults to 15000. */
|
|
1267
|
+
timeoutMs?: number;
|
|
1268
|
+
/** Alias for `timeoutMs`, useful when mirroring native examples. */
|
|
1269
|
+
timeout?: number;
|
|
1270
|
+
/** Called every time the discovered device list changes during the scan. */
|
|
1271
|
+
onResults?: ScanResultsCallback;
|
|
1272
|
+
}
|
|
1273
|
+
export type ScanModelOptions = Omit<ScanOptions, "model">;
|
|
1274
|
+
export interface WifiSearchResult {
|
|
1275
|
+
ssid: string;
|
|
1276
|
+
requiresPassword: boolean;
|
|
1277
|
+
signalStrength: number;
|
|
1278
|
+
/** Frequency in MHz (from glasses scan). 5 GHz band is typically 5170闂?825. Omitted if unknown. */
|
|
1279
|
+
frequency?: number;
|
|
1280
|
+
}
|
|
1281
|
+
export interface BluetoothStatus {
|
|
1282
|
+
searching: boolean;
|
|
1283
|
+
searchingController: boolean;
|
|
1284
|
+
default_wearable?: DeviceModel | "";
|
|
1285
|
+
pending_wearable?: DeviceModel | "";
|
|
1286
|
+
device_name?: string;
|
|
1287
|
+
device_address?: string;
|
|
1288
|
+
default_controller?: DeviceModel | "";
|
|
1289
|
+
pending_controller?: DeviceModel | "";
|
|
1290
|
+
controller_device_name?: string;
|
|
1291
|
+
controller_address?: string;
|
|
1292
|
+
systemMicUnavailable: boolean;
|
|
1293
|
+
micRanking: MicMode[];
|
|
1294
|
+
currentMic: MicMode | "" | null;
|
|
1295
|
+
/**
|
|
1296
|
+
* Nearby glasses in stable discovery order.
|
|
1297
|
+
* Existing entries keep their array position as details refresh; new glasses append at the end,
|
|
1298
|
+
* and removals should not reorder remaining entries.
|
|
1299
|
+
*/
|
|
1300
|
+
searchResults: Device[];
|
|
1301
|
+
wifiScanResults: WifiSearchResult[];
|
|
1302
|
+
lastLog: string[];
|
|
1303
|
+
otherBtConnected: boolean;
|
|
1304
|
+
galleryModeEnabled: boolean;
|
|
1305
|
+
}
|
|
1306
|
+
export type BluetoothSettingsUpdate = Partial<{
|
|
1307
|
+
auth_email: string;
|
|
1308
|
+
core_token: string;
|
|
1309
|
+
sensing_enabled: boolean;
|
|
1310
|
+
power_saving_mode: boolean;
|
|
1311
|
+
lc3_frame_size: number;
|
|
1312
|
+
preferred_mic: MicPreference;
|
|
1313
|
+
screen_disabled: boolean;
|
|
1314
|
+
contextual_dashboard: boolean;
|
|
1315
|
+
head_up_angle: number;
|
|
1316
|
+
imu_enabled: boolean;
|
|
1317
|
+
brightness: number;
|
|
1318
|
+
auto_brightness: boolean;
|
|
1319
|
+
dashboard_height: number;
|
|
1320
|
+
dashboard_depth: number;
|
|
1321
|
+
menu_apps: DashboardMenuItem[] | CoreDashboardMenuItem[] | Array<Record<string, unknown>> | null;
|
|
1322
|
+
calendar_events: CalendarEvent[];
|
|
1323
|
+
metric_system: boolean;
|
|
1324
|
+
twelve_hour_time: boolean;
|
|
1325
|
+
gallery_mode: boolean;
|
|
1326
|
+
voice_activity_detection_enabled: boolean;
|
|
1327
|
+
loudness_gate_enabled: boolean;
|
|
1328
|
+
button_photo_size: ButtonPhotoSize;
|
|
1329
|
+
button_video_settings: {
|
|
1330
|
+
width: number;
|
|
1331
|
+
height: number;
|
|
1332
|
+
fps: number;
|
|
1333
|
+
};
|
|
1334
|
+
button_video_width: number;
|
|
1335
|
+
button_video_height: number;
|
|
1336
|
+
button_video_fps: number;
|
|
1337
|
+
button_max_recording_time: number;
|
|
1338
|
+
camera_fov: NativeCameraFovSetting;
|
|
1339
|
+
should_send_pcm: boolean;
|
|
1340
|
+
should_send_lc3: boolean;
|
|
1341
|
+
should_send_transcript: boolean;
|
|
1342
|
+
offline_mode: boolean;
|
|
1343
|
+
local_stt_fallback_active: boolean;
|
|
1344
|
+
pending_wearable: DeviceModel | "";
|
|
1345
|
+
default_wearable: DeviceModel | "";
|
|
1346
|
+
device_name: string;
|
|
1347
|
+
device_address: string;
|
|
1348
|
+
default_controller: DeviceModel | "";
|
|
1349
|
+
pending_controller: DeviceModel | "";
|
|
1350
|
+
controller_device_name: string;
|
|
1351
|
+
controller_address: string;
|
|
1352
|
+
}>;
|
|
1353
|
+
export {};
|
|
1354
|
+
//# sourceMappingURL=BluetoothSdk.types.d.ts.map
|