Hi
I am writing an aplication with three activities. In each of them I need to use bluetooth,serial,Async... so it is necessary to use service module.
I decided to use some part of code of File Transfer example (very good example)
https://www.b4x.com/android/forum/th...nd-and-receive-files-with-asyncstreams.30493/
but I have one question related the code
In Main File you use StateChanged Event
but In Service Module the same Event
In which mode your service mode works ?
Which Event will have higher priority ?
Which will be first ?
i mean service in foregroundmode
Regards
Artur
I am writing an aplication with three activities. In each of them I need to use bluetooth,serial,Async... so it is necessary to use service module.
I decided to use some part of code of File Transfer example (very good example)
https://www.b4x.com/android/forum/th...nd-and-receive-files-with-asyncstreams.30493/
but I have one question related the code
In Main File you use StateChanged Event
B4X:
Sub Admin_StateChanged (NewState As Int, OldState As Int)
UpdateUI
End Sub
B4X:
Sub admin_StateChanged (NewState As Int, OldState As Int)
If NewState = admin.STATE_ON Then serial1.Listen2("na", uuid)
End Sub
Which Event will have higher priority ?
Which will be first ?
i mean service in foregroundmode
Regards
Artur
Last edited: