I have an APP which communicates with a computer using network sockets (TCP protocol). The computer is only allowed to communicate with one device at a time, therefore when the App is closed (by the user), it sends a special sign-off message to the computer.
Generally, the App works Ok on Android-10 and Android-14 devices. Except when the App is closed then only the Android-10 appears to send the sign-off message.
The software to send the sign-off message is initiated within the Starter service sub Service_TaskRemoved()
The App uses B4X pages, and the software which sends the sign-off message to the computer sits in a class which is declared in the Main Page.
I assume the sign-off software is OK as it works on Android-10, when the App is closed, and will also work if activated manually within the App (on both Android-10 and Android-14 devices).
Perhaps Android-14 has a problem with services - but I am not sure, any input would be appreciated.
Kind regards
Dave
Generally, the App works Ok on Android-10 and Android-14 devices. Except when the App is closed then only the Android-10 appears to send the sign-off message.
The software to send the sign-off message is initiated within the Starter service sub Service_TaskRemoved()
Disconnect software in Starter service:
' This event will be raised when the user removes the app from the recent apps list.
Sub Service_TaskRemoved
B4XPages.MainPage.helper.DisconnectFromServer 'TODO This could be throwing and error in Android 14 (at shutdown).
End Sub
The App uses B4X pages, and the software which sends the sign-off message to the computer sits in a class which is declared in the Main Page.
I assume the sign-off software is OK as it works on Android-10, when the App is closed, and will also work if activated manually within the App (on both Android-10 and Android-14 devices).
Perhaps Android-14 has a problem with services - but I am not sure, any input would be appreciated.
Kind regards
Dave