Tested with a Pixel on Android 8.0 using a wireless keyboard. Build the app and you will see the OS logs appear. When a wireless keyboard is connected to the device via bluetooth it causes the app to soft reset on Android. I used
because I've had problems with the soft reset holding things in memory.
the listener works correctly. The app restarts and runs 'Start by OS' and 'Resume by OS'.
the listener does not fire the 'START' & 'RESUME' activity listener after the reset. You will notice this by the lack of error logs.