Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6175911
chore: rewrite nex sgc
yagarwal1307 Jan 5, 2026
b9b3bec
chore: refactor and cleanup nex sgc
yagarwal1307 Jan 5, 2026
2017183
chore: refactor the code more
yagarwal1307 Jan 6, 2026
2fb5916
chore: refactor the constants
yagarwal1307 Jan 6, 2026
c6c17c4
fix: fix imports
yagarwal1307 Jan 6, 2026
58356f1
fix: fix some of the errors
yagarwal1307 Jan 6, 2026
dc6377c
fix: fix compilation erros
yagarwal1307 Jan 6, 2026
35c12d3
chore: fix connection bugs
yagarwal1307 Jan 7, 2026
0ba7f1c
chore: fix the nex developer settings
yagarwal1307 Jan 7, 2026
7c78a1d
Merge branch 'dev' into ya/rewrite-nex-sgc
yagarwal1307 Jan 8, 2026
a65262a
fix: fix the interface
yagarwal1307 Jan 9, 2026
b3be066
chore: fix the nex ble filtering
yagarwal1307 Jan 9, 2026
a8c2fc3
chore: fix nex developer settings schema versions
yagarwal1307 Jan 9, 2026
75f7665
chore: merge dev into nex sgc
yagarwal1307 Jan 15, 2026
6a1a006
chore: replace m dashes with normal
yagarwal1307 Jan 15, 2026
b8c0513
Merge branch 'dev' into ya/rewrite-nex-sgc
yagarwal1307 Jan 15, 2026
884edc4
Fix missing sendDataSequentially call for protobuf version request
aisraelov Jan 15, 2026
06eeaea
Merge branch 'dev' into ya/rewrite-nex-sgc
yagarwal1307 Jan 20, 2026
34f66fc
chore: refactor nex event functions
yagarwal1307 Jan 20, 2026
b16d3ad
Merge branch 'dev' into ya/rewrite-nex-sgc
yagarwal1307 Jan 20, 2026
6cf4583
fix: fix duplicate commands and send proper clear display command
yagarwal1307 Jan 21, 2026
62bf58d
fix: fix the nex glasses mic issue
yagarwal1307 Jan 22, 2026
b536a3a
Merge branch 'dev' into ya/rewrite-nex-sgc
yagarwal1307 Jan 23, 2026
983765f
fix: fix the display bitmap image function call
yagarwal1307 Jan 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mobile/modules/core/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ dependencies {
// Vuzix Z100
implementation 'com.vuzix:ultralite-sdk-android:1.8'
implementation 'com.squareup.picasso:picasso:2.8'

implementation 'com.google.protobuf:protobuf-java:4.32.0'
implementation 'com.google.protobuf:protobuf-java-util:4.32.0'
}

// Force override onnxruntime version to 1.17.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,58 @@ public class Bridge private constructor() {
}
}

fun sendHeartbeatSentEvent(timestamp: Long) {
try {
val data = HashMap<String, Any>()
data["timestamp"] = timestamp

sendTypedMessage("heartbeat_sent", data as Map<String, Any>)
log("NOTIF: Successfully queued heartbeat sent event")
} catch (e: Exception) {
Log.e(TAG, "NOTIF: Error sending heartbeat sent event", e)
}
}

fun sendHeartbeatReceivedEvent(timestamp: Long) {
try {
val data = HashMap<String, Any>()
data["timestamp"] = timestamp

sendTypedMessage("heartbeat_received", data as Map<String, Any>)
log("NOTIF: Successfully queued heartbeat received event")
} catch (e: Exception) {
Log.e(TAG, "NOTIF: Error sending heartbeat received event", e)
}
}

fun sendBleCommandSentEvent(payloadCase: String, packetHex: String, timestamp: Long) {
try {
val data = HashMap<String, Any>()
data["command"] = payloadCase
data["commandText"] = packetHex
data["timestamp"] = timestamp

sendTypedMessage("send_command_to_ble", data as Map<String, Any>)
log("NOTIF: Successfully queued ble command sent event")
} catch (e: Exception) {
Log.e(TAG, "NOTIF: Error sending ble command sent event", e)
}
}

fun sendBleCommandReceivedEvent(payloadCase: String, packetHex: String, timestamp: Long) {
try {
val data = HashMap<String, Any>()
data["command"] = payloadCase
data["commandText"] = packetHex
data["timestamp"] = timestamp

sendTypedMessage("receive_command_from_ble", data as Map<String, Any>)
log("NOTIF: Successfully queued ble command received event")
} catch (e: Exception) {
Log.e(TAG, "NOTIF: Error sending ble command received event", e)
}
}

/** Get supported events Don't add to this list, use a typed message instead */
@JvmStatic
fun getSupportedEvents(): Array<String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.mentra.core.services.PhoneMic
import com.mentra.core.sgcs.G1
import com.mentra.core.sgcs.Mach1
import com.mentra.core.sgcs.MentraLive
import com.mentra.core.sgcs.MentraNex
import com.mentra.core.sgcs.SGCManager
import com.mentra.core.sgcs.Simulated
import com.mentra.core.utils.DeviceTypes
Expand Down Expand Up @@ -916,6 +917,8 @@ class CoreManager {
sgc = G1()
} else if (wearable.contains(DeviceTypes.LIVE)) {
sgc = MentraLive()
} else if (wearable.contains(DeviceTypes.NEX)) {
sgc = MentraNex()
} else if (wearable.contains(DeviceTypes.MACH1)) {
sgc = Mach1()
} else if (wearable.contains(DeviceTypes.Z100)) {
Expand Down Expand Up @@ -1018,6 +1021,11 @@ class CoreManager {
}
}

fun clearDisplay() {
Bridge.log("MAN: Clearing Display")
sgc?.clearDisplay()
}

fun displayEvent(event: Map<String, Any>) {
val view = event["view"] as? String
if (view == null) {
Expand Down Expand Up @@ -1349,10 +1357,15 @@ class CoreManager {
glassesSettings["button_camera_led"] = buttonCameraLed

val coreInfo =
mapOf(
"is_searching" to isSearching,
mutableMapOf<String, Any>(
"is_searching" to isSearching,
)

sgc?.let {
coreInfo["glasses_protobuf_version"] = it.glassesProtobufVersion
coreInfo["protobuf_schema_version"] = it.protobufSchemaVersion
}

val apps = emptyList<Any>()

val authObj = mapOf("core_token_owner" to coreTokenOwner)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class CoreModule : Module() {
coreManager?.displayText(params)
}

AsyncFunction("clearDisplay") { coreManager?.clearDisplay() }

// MARK: - Connection Commands

AsyncFunction("getStatus") { coreManager?.getStatus() }
Expand Down
Loading
Loading