To make sure the program runs properly on Samsung phones with Android 9 do the following steps:
- Tap Device care
- Tap Battery
- Tap Menu button
- Tap Advanced settings
- Disable "Put unused apps to sleep" and "Auto disable unused apps"
- Go back to "Device care",
- Tap Menu button and disable "Auto optimization".