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
aec8377a
Commit
aec8377a
authored
Mar 11, 2026
by
Lisa (AI Assistant)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Call startForeground FIRST in onCreate
parent
029cfdc1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
NodeService.kt
...main/java/com/nexlab/openclaw/node/service/NodeService.kt
+4
-2
No files found.
app/src/main/java/com/nexlab/openclaw/node/service/NodeService.kt
View file @
aec8377a
...
...
@@ -52,10 +52,13 @@ class NodeService : Service() {
override
fun
onCreate
()
{
super
.
onCreate
()
// CRITICAL: Call startForeground FIRST to avoid being killed
createNotificationChannel
()
startForeground
(
NOTIFICATION_ID
,
createNotification
())
// Initialize NodeClient with context for device identity persistence
nodeClient
.
setContext
(
this
)
// NodeClient is initialized directly above
// Debug: Write to file
try
{
val
debugFile
=
java
.
io
.
File
(
cacheDir
,
"nodeservice_debug.txt"
)
...
...
@@ -63,7 +66,6 @@ class NodeService : Service() {
}
catch
(
e
:
Exception
)
{}
Log
.
e
(
TAG
,
"NodeService onCreate called!"
)
createNotificationChannel
()
acquireWakeLock
()
// Auto-start with saved settings OR hardcoded defaults
...
...
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