Thank you, Quinn!
The app shall record telemetry data from a device in a vehicle. The device continuously sends out the UDP packets over WiFi.
It is a specific user in a managed environment. Nothing the general public would use or come in contact with.
The user enters the vehicle and ideally, the app shall already start recording or the user presses a "Start Recording" button after entering the vehicle, doesn't matter, as long as the user does not have to necessarily keep the app active all the time. There might be other apps the user might need in that situation. So there is always the danger the app might get suspended.
Navigation could be an option and if its the only viable option there might be a use case that could involve navigation.
Reading the documents you have provided me made be thinking about background tasks again.
Might it be possible to start a background task, e.g. every X seconds that captures a few UDP packets and then finishes until the next X seconds have passed?
Naively thinking, I somehow would have to put
connection.receiveMessage { (data, context, isComplete, error) in
// Decode and continue processing data
}
into a background process.
Is it doable in some way?