Since Android Things only runs one app at a time, I'm not sure how the rules differ from normal Android OS when it comes to killing/backgrounding/resuming a process.
My Android Things use case is not trivial. I'm controlling actuators with PWM channels. The problem is if I set a "move command" and then there is a fatal exception or other such interruption, my app is crashed but the actuator arms keep moving (because the PWM shield retains its power and values)! As these arms are controlling a moving boat, this is quite dangerous.
Is there someway, somehow to intercept the killing of the process so I can get my PWM "zero out" commands in? Or is there someway to game Android Things to immediately boot some other process that does this after my main app dies?