I'am asking you politely in what environment/setup you were able to test it with success
Windows environment is not relevant. It was tested on Android 10.
I tried it again.
Here are the exact steps and the logs:
1. Download the example I've previously uploaded.
2. Run it in release mode.
3. Click on the home button.
4. Reinstall the APK with ADB as explained in my previous post.
** Receiver (packagereplaced) OnReceive **
*** Service (starter) Create ***
** Service (starter) Start **
*** Service (packagereplaced) Create ***
** Service (packagereplaced) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Receiver (packagereplaced) OnReceive ** <-------- after the call to adb
*** Service (starter) Create ***
** Service (starter) Start **
** Service (packagereplaced) Create **
** Service (packagereplaced) Start **
Service started in foreground mode.