we have a project which uses background service to retrieve real-time events from server. we use s websocket connection to retrieve data. but now in Android Oreo or higher, os starts to showing battery Warning.
my concern is that if we migrate to jobscheduler does it stop after sometime. we want to show a notification if event happen
i tried job scheduler and it offers recurring invokes. but our connection is real-time so if jobscheduler stops we don't get data. so how other apps handle this (example WhatsApp )
what is the best way to keep our connection live and retrieve data ?
thanks advance