red30 Well-Known Member Licensed User Longtime User Feb 13, 2021 #1 I send a large number of photos (100-300 pieces) to the server and do it through the service in the background. I create a StarterPostPhoto service and call the Post subroutine there After that, in a loop, photos will be transferred to me. If I lock the phone to a physical button, the photos continue to be transmitted, but after a while the service is destroyed. Why is this happening? B4X: Copy ** Service (starterpostphoto) Destroy ** ** Service (starter) Destroy (ignored)** ** Service (httputils2service) Destroy ** I found similar problems on the forum, but did not understand how to resolve this issue ...
I send a large number of photos (100-300 pieces) to the server and do it through the service in the background. I create a StarterPostPhoto service and call the Post subroutine there After that, in a loop, photos will be transferred to me. If I lock the phone to a physical button, the photos continue to be transmitted, but after a while the service is destroyed. Why is this happening? B4X: Copy ** Service (starterpostphoto) Destroy ** ** Service (starter) Destroy (ignored)** ** Service (httputils2service) Destroy ** I found similar problems on the forum, but did not understand how to resolve this issue ...
Erel B4X founder Staff member Licensed User Longtime User Feb 14, 2021 #2 You need to make the service a foreground service. Upvote 0