Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
android:icon="@mipmap/ic_launcher"
android:label="VisionClaw"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/Theme.CameraAccess">

<!-- Without Developer Mode, this key will need to be set with ID from app registered in Wearables Developer Center -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ class GeminiLiveService {
}
})

// Timeout after 15 seconds (use Timer so we don't block sendExecutor)
// Cancel any previous timer before creating a new one (prevents leaks on repeated connect())
timeoutTimer?.cancel()
timeoutTimer = Timer().apply {
schedule(object : TimerTask() {
override fun run() {
Expand All @@ -134,6 +135,7 @@ class GeminiLiveService {
fun disconnect() {
timeoutTimer?.cancel()
timeoutTimer = null
sendExecutor.shutdownNow()
webSocket?.close(1000, null)
webSocket = null
onToolCall = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ class WebRTCClient(private val context: Context) {
// Create video source + track with custom capturer
val factory = peerConnectionFactory ?: return
videoSource = factory.createVideoSource(false) // false = not a screen cast
customCapturer = CustomVideoCapturer().apply { initialize(videoSource!!) }
val source = videoSource ?: return
customCapturer = CustomVideoCapturer().apply { initialize(source) }
localVideoTrack = factory.createVideoTrack("video0", videoSource).apply {
setEnabled(true)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<!-- Allow cleartext only for local network (OpenClaw gateway on LAN) -->
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">localhost</domain>
<domain includeSubdomains="true">127.0.0.1</domain>
<domain includeSubdomains="true">10.0.0.0/8</domain>
<domain includeSubdomains="true">192.168.0.0/16</domain>
<domain includeSubdomains="true">172.16.0.0/12</domain>
</domain-config>
<!-- Block cleartext for all other domains (enforce HTTPS) -->
<base-config cleartextTrafficPermitted="false" />
</network-security-config>