Android Question Service swipe out of app tray

jayel

Active Member
Licensed User
Longtime User
Hello,

I have an app that runs a service with a websocket.
Now when I push the button that shows all the apps that are running, i swipe out my app and the pauze event fires with userclosed true, there I close my service.(normal)

When i push the home button the pauze event fires with userclosed = false (normal)

But when I push the button to show all my running apps and swipe out my app (close the app). No event get fired, so I cannot close my service and I get a message "appname stopped".

Greets,

John
 

jayel

Active Member
Licensed User
Longtime User
the strange thing is that i do not see any error
** Activity (main) Create, isFirst = true **
GC_CONCURRENT freed 1976K, 63% free 5633K/14860K, paused 2ms+2ms, total 24ms
CreateTable: CREATE TABLE IF NOT EXISTS [tblhost] ([id] INTEGER PRIMARY KEY, [locatie] TEXT, [naam] TEXT)
** Activity (main) Resume **
** Service (httputils2service) Create **
** Service (httputils2service) Start **
JobName = LoginSpecial, Success = true
{"tag":"loginspecial","error":false,"user"

Qty Records1
itemid = 0
http://xxx.xxx.xxx.xxx/robodomotica/
** Activity (main) Pause, UserClosed = false **
** Activity (domoticamain) Create, isFirst = true **
http://xxx.xxx.xxx.xxx/robodomotica/
** Activity (domoticamain) Resume **
JobName = GetIni, Success = true
ws://xxx.xxx.xxx.xxx:51000/ws
** Service (pushservice) Create **
** Service (pushservice) Start **
WebSocket Connected
JobName = GetGroups, Success = true
itemid = 0
itemid = 1
itemid = 2
itemid = 3
itemid = 4
itemid = 5
JobName = GetAllItemsGroup, Success = true
** Activity (domoticamain) Pause, UserClosed = false **
wsh_output : 14;0;24.3
wsh_output : 29;0;23.4
wsh_output : 9;0;21.9
wsh_output : b;0;13.2
wsh_output : 27;0;13.6
wsh_output : 2a;0;23.8
wsh_output : 8;0;23.0
GC_CONCURRENT freed 1920K, 63% free 5632K/14860K, paused 6ms+96ms, total 491ms
GC_CONCURRENT freed 1920K, 63% free 5632K/14860K, paused 5ms+382ms, total 475ms
GC_CONCURRENT freed 1920K, 63% free 5632K/14860K, paused 79ms+8ms, total 168ms
 
Last edited:
Upvote 0

jayel

Active Member
Licensed User
Longtime User
Erel,

Just tested it in release mode and i still get errors.
And in my log window i don't see anithing unussual.
LogCat connected to: B4A-Bridge: samsung SM-T530
Installing file.
GC_CONCURRENT freed 2000K, 62% free 5676K/14860K, paused 5ms+3ms, total 61ms
WAIT_FOR_CONCURRENT_GC blocked 15ms
--------- beginning of /dev/log/main
Connected to B4A-Bridge (Wifi)
sending message to waiting queue (CallSubDelayed - UpdateStatus)
Installing file.
PackageAdded: package:be.robotronic.robodomotica
 
Upvote 0

jayel

Active Member
Licensed User
Longtime User
I have following on top of my service :
B4X:
#Region  Service Attributes
    #StartAtBoot: false
    #StartCommandReturnValue: android.app.Service.START_STICKY
#End Region

Could this affect something?
 
Upvote 0
Top