For OnePlus, we recommend you do the following two things:
Disable Battery optimization* for Bob:
a. Go to Settings → Apps & notifications → See all apps
b. Scroll to Bob and select it → Battery → Battery optimization
c. Scroll to Bob and select it → select “Don't optimize
2. Lock** Bob from getting shut down, allow it to “sleep” in the background, and prevent the OS from terminate it.
a. Open the App Switcher from the “Square” icon of the Android bottom toolbar
b. Tap the 3-dots button on the top-right corner, above the app screenshot, and select Lock
c. You should now see the Lock icon next to “Bob” above the screenshot
*Despite the term Battery optimization, switching to this state should not change the usage in a significant way. Bob is already optimized to use a very low battery power.
** This should not increase the battery usage, as in the background, the app is switched to Suspended mode, which keeps its resources to the minimum. In fact, this is actually the guideline of both Android and iOS – not to explicitly close apps (excluding cases such as radio or navigation apps).