If decide to use ExitApplication, i have this code that i use in Main Pause Userclosed = true
Result
Will sending Message to waiting queue pose an issue? I had to use sleep(0) to allow service to get destroyed.
B4X:
StopService(ComSerial)
StopService(CommunicationRoutine)
Sleep(0)
ExitApplication 'remove this and test it.
Result
** Activity (main) Pause, UserClosed = true **
No wakelock.
Sub mnuDisconnect
No wakelock.
Setting Manager Debug Log
** Service (comserial) Destroy **
** Service (communicationroutine) Destroy **
No partial wakelock.
sending message to waiting queue (sleep)
Will sending Message to waiting queue pose an issue? I had to use sleep(0) to allow service to get destroyed.