In my aplication I have service module and three activities.
In service module I detect whether bluetooth module is on.
If user or another aplication turns off BT (when my aplication is running on). My aplication should be closed as well.
I wonder what should be closed at the beginning.
service module or aplication.
It is my code to detect if BT was turned off
In service module I detect whether bluetooth module is on.
If user or another aplication turns off BT (when my aplication is running on). My aplication should be closed as well.
I wonder what should be closed at the beginning.
service module or aplication.
It is my code to detect if BT was turned off
B4X:
Sub admin_StateChanged (NewState As Int, OldState As Int)
If (IsPaused(Main) = False Or IsPaused(Parameters) = False Or IsPaused(calibration)=False) And (NewState = admin.STATE_OFF) Then
Common.connected = False
Log ("BT off")
what should be here ?
End If
End Sub