Dear All
I am trying to build a solution that listens to data coming from an ESP32. The ESP and my phone are in my home network. They are conencting nicely and I can see the data coming in. The ESP is acting as the server and my solution is connecting to this server as needed. Once I have actively connected to the ESP, it is critical that the app keeps running until I actively close the connection. The problem I have is that my phone/OS is killing the app/process after a while. That makes my app unuseable.
I put everything in the app I could find in the forum and other sources. The last idea I found was to run the app as a foreground service. Also that is not working and the OS is still killing the app randomly after some time.
I have attached my app.
I would appreciate any help and support. Please let me know if it is possible to do what I am aiming to do, or what I am doing wrong, or what I am missing.
Many thanks
René
I am trying to build a solution that listens to data coming from an ESP32. The ESP and my phone are in my home network. They are conencting nicely and I can see the data coming in. The ESP is acting as the server and my solution is connecting to this server as needed. Once I have actively connected to the ESP, it is critical that the app keeps running until I actively close the connection. The problem I have is that my phone/OS is killing the app/process after a while. That makes my app unuseable.
I put everything in the app I could find in the forum and other sources. The last idea I found was to run the app as a foreground service. Also that is not working and the OS is still killing the app randomly after some time.
I have attached my app.
I would appreciate any help and support. Please let me know if it is possible to do what I am aiming to do, or what I am doing wrong, or what I am missing.
Many thanks
René