Commit 702616dd authored by Lisa (AI Assistant)'s avatar Lisa (AI Assistant)

Fix: Syntax error in NodeService

parent 03c5e85c
......@@ -144,21 +144,7 @@ class NodeService : Service() {
val fullUrl = if (protocol == "WSS") "wss://$ip:$port" else "ws://$ip:$port"
// Delay startup briefly to let startForeground settle
android.os.Handler(android.os.Looper.getMainLooper()).postDelayed({
System.out.println("=== NodeService STARTED with URL: $fullUrl ===")
Log.d(TAG, "Starting with URL: $fullUrl, token present: ${token.isNotBlank()}")
// Debug: Write to file
try {
val debugFile = java.io.File(cacheDir, "nodeservice_debug.txt")
debugFile.appendText("START action: url=$fullUrl tokenLen=${token.length} nodeId=$nodeId\n")
} catch (e: Exception) {}
// Show toast for debugging
try {
Log.e(TAG, "Starting: $fullUrl")
} catch (e: Exception) {}
// Use coroutine delay to avoid Handler issues
scope.launch {
delay(3000) // Wait 3 seconds before starting
startNode(fullUrl, token, nodeId)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment