In Android I have MQTT functions in a service that is started with Startforeground.
In IOS there is no Startforeground.
How can I make sure that MQTT is always running.
Yes I do use this code.
But in Android, without Startforeground, the service is killed.
And in Ios I expect the same, but there is no Startforeground.
I need the service to run always.
My app will include a GeoFence service, this I can mark as Background execution, type location.
Will it be too creative to put my MQTT in the same service
Geofence will not help. The OS will start the app when the user crosses the region and will then stop it. It cannot be used to run lengthy tasks in the background.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.