Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
O
openclaw-android-node
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lisa
openclaw-android-node
Commits
e822ab20
Commit
e822ab20
authored
Mar 11, 2026
by
Lisa (AI Assistant)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add hardcoded gateway config for pairing test, update to SDK 36
parent
85bd8e7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
13 deletions
+36
-13
build.gradle.kts
app/build.gradle.kts
+2
-2
NodeService.kt
...main/java/com/nexlab/openclaw/node/service/NodeService.kt
+34
-11
No files found.
app/build.gradle.kts
View file @
e822ab20
...
@@ -7,12 +7,12 @@ plugins {
...
@@ -7,12 +7,12 @@ plugins {
android
{
android
{
namespace
=
"com.nexlab.openclaw.node"
namespace
=
"com.nexlab.openclaw.node"
compileSdk
=
3
5
compileSdk
=
3
6
defaultConfig
{
defaultConfig
{
applicationId
=
"com.nexlab.openclaw.node"
applicationId
=
"com.nexlab.openclaw.node"
minSdk
=
26
minSdk
=
26
targetSdk
=
3
5
targetSdk
=
3
6
versionCode
=
1
versionCode
=
1
versionName
=
"0.1.0"
versionName
=
"0.1.0"
multiDexEnabled
=
true
multiDexEnabled
=
true
...
...
app/src/main/java/com/nexlab/openclaw/node/service/NodeService.kt
View file @
e822ab20
...
@@ -59,15 +59,27 @@ class NodeService : Service() {
...
@@ -59,15 +59,27 @@ class NodeService : Service() {
createNotificationChannel
()
createNotificationChannel
()
acquireWakeLock
()
acquireWakeLock
()
// Auto-start with saved settings
// Auto-start with saved settings
OR hardcoded defaults
try
{
try
{
val
prefs
=
getSharedPreferences
(
"openclaw_settings"
,
MODE_PRIVATE
)
val
prefs
=
getSharedPreferences
(
"openclaw_settings"
,
MODE_PRIVATE
)
Log
.
e
(
TAG
,
"Reading SharedPreferences..."
)
Log
.
e
(
TAG
,
"Reading SharedPreferences..."
)
val
ip
=
prefs
.
getString
(
"gateway_ip"
,
""
)
?:
""
// Use SharedPreferences or fall back to hardcoded defaults
val
port
=
prefs
.
getString
(
"gateway_port"
,
"18789"
)
?:
"18789"
var
ip
=
prefs
.
getString
(
"gateway_ip"
,
""
)
?:
""
val
token
=
prefs
.
getString
(
"node_token"
,
""
)
?:
""
var
port
=
prefs
.
getString
(
"gateway_port"
,
"18789"
)
?:
"18789"
val
protocol
=
prefs
.
getString
(
"gateway_protocol"
,
"WS"
)
?:
"WS"
var
token
=
prefs
.
getString
(
"node_token"
,
""
)
?:
""
val
nodeId
=
prefs
.
getString
(
"node_id"
,
""
)
?:
""
var
protocol
=
prefs
.
getString
(
"gateway_protocol"
,
"WS"
)
?:
"WS"
var
nodeId
=
prefs
.
getString
(
"node_id"
,
""
)
?:
""
// TEMPORARY HARDCODED CONFIG FOR PAIRING TESTING
if
(
ip
.
isBlank
())
{
Log
.
e
(
TAG
,
"Using hardcoded config for pairing test"
)
ip
=
"192.168.11.46"
port
=
"18789"
token
=
"415fa3c21b7ef06f22aff571697d88c59c2dc67737681267"
protocol
=
"WS"
nodeId
=
"android-node"
}
// END TEMPORARY CONFIG
Log
.
e
(
TAG
,
"Settings read: ip=$ip tokenLen=${token.length} port=$port"
)
Log
.
e
(
TAG
,
"Settings read: ip=$ip tokenLen=${token.length} port=$port"
)
...
@@ -96,11 +108,22 @@ class NodeService : Service() {
...
@@ -96,11 +108,22 @@ class NodeService : Service() {
"START"
->
{
"START"
->
{
startForeground
(
NOTIFICATION_ID
,
createNotification
())
startForeground
(
NOTIFICATION_ID
,
createNotification
())
// Get settings from Intent extras
// Get settings from Intent extras
val
protocol
=
intent
.
getStringExtra
(
"gateway_protocol"
)
?:
"WS"
var
protocol
=
intent
.
getStringExtra
(
"gateway_protocol"
)
?:
"WS"
val
ip
=
intent
.
getStringExtra
(
"gateway_ip"
)
?:
""
var
ip
=
intent
.
getStringExtra
(
"gateway_ip"
)
?:
""
val
port
=
intent
.
getStringExtra
(
"gateway_port"
)
?:
"18789"
var
port
=
intent
.
getStringExtra
(
"gateway_port"
)
?:
"18789"
val
token
=
intent
.
getStringExtra
(
"node_token"
)
?:
""
var
token
=
intent
.
getStringExtra
(
"node_token"
)
?:
""
val
nodeId
=
intent
.
getStringExtra
(
"node_id"
)
?:
""
var
nodeId
=
intent
.
getStringExtra
(
"node_id"
)
?:
""
// TEMPORARY HARDCODED CONFIG FOR PAIRING TESTING
if
(
ip
.
isBlank
())
{
Log
.
e
(
TAG
,
"Using hardcoded config for pairing test"
)
ip
=
"192.168.11.46"
port
=
"18789"
token
=
"415fa3c21b7ef06f22aff571697d88c59c2dc67737681267"
protocol
=
"WS"
nodeId
=
"android-node"
}
// END TEMPORARY CONFIG
val
fullUrl
=
if
(
protocol
==
"WSS"
)
"wss://$ip:$port"
else
"ws://$ip:$port"
val
fullUrl
=
if
(
protocol
==
"WSS"
)
"wss://$ip:$port"
else
"ws://$ip:$port"
System
.
out
.
println
(
"=== NodeService STARTED with URL: $fullUrl ==="
)
System
.
out
.
println
(
"=== NodeService STARTED with URL: $fullUrl ==="
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment