I am using nearby connections API from a foreground service to find other devices and share data with them. It works even if the app is not in the foreground. That happens pretty fast like in 5-15 seconds. But when device enters doze mode like when screen goes off than it stops working. I found a way to ignore battery optimizations and can so continue to work from foreground service even when screen is off BUT the time needed to find and share data between devices is increased to 30-45 seconds. Is there a way to "speed up" this process while in doze mode? Or maybe are there some other tools that I might use to share data with my app on android devices near me even when device has screen off?