My app uses one activity (Main), Starter service and a service called scan. I am trying to shut down the whole app by clicking an Exit button in the menu but its not working and I can't see why.
I have a boolean called killapp.
The button calls this sub:-
In Activity_Pause and Activity_Resume I have this:-
The app appears to close but is still open (or at least partially open), in the log I see as below, how can I debug what is not closing properly?
I have a boolean called killapp.
The button calls this sub:-
B4X:
Sub mnuExit_Click
killapp = True
StopService(scan)
StopService(Starter)
Activity.Finish
End Sub
In Activity_Pause and Activity_Resume I have this:-
B4X:
If killapp = True Then
admin.Disable
pw.ReleaseKeepAlive
Log("Kill App is " & killapp)
StopService(scan)
StopService(Starter)
Activity.Finish
End If
The app appears to close but is still open (or at least partially open), in the log I see as below, how can I debug what is not closing properly?
HWUI GL Pipeline
** Service (scan) Destroy **
Stopping scan
** Service (starter) Destroy (ignored)**
** Activity (main) Pause, UserClosed = true **
Kill App is true
ignoring event: admin_statechanged
ignoring event: admin_statechanged
onBluetoothServiceDown: android.bluetooth.IBluetooth$Stub$Proxy@58652a1
onBluetoothServiceDown: Sending callbacks to 0 clients
onBluetoothServiceDown: Finished sending callbacks to registered clients
ignoring event: gps_gpsstatus
ignoring event: gps_gpsstatus
ignoring event: gps_locationchanged
ignoring event: gps_gpsstatus
onBluetoothServiceUp: android.bluetooth.IBluetooth$Stub$Proxy@18ad487
onBluetoothServiceDown: android.bluetooth.IBluetooth$Stub$Proxy@18ad487
onBluetoothServiceDown: Sending callbacks to 0 clients
onBluetoothServiceDown: Finished sending callbacks to registered clients
onBluetoothServiceUp: android.bluetooth.IBluetooth$Stub$Proxy@c47cfb4