firebase job dispatcher is work in dozemode in android.?

1.1k views Asked by At

I am working on a video call application. While the app is in doze mode call is not established. So I am using alternative firebase job dispatcher so please tell me, does job dispatcher work in dozemode or not?

3

There are 3 answers

0
Mina Wissa On

As described in the documentation, if you want your application to respond immediately to any notification or if your app requires real time messaging integration with a backend service (Video call in your case), you should use Firebase Cloud Messaging (FCM) high priority messages to trigger waking your app while the device is idle.

0
cutiko On

The Android device will enter in doze mode, which means it will save battery, from once in a while the OS will coordinate battery consuming jobs to be executed. This loose the exact time scheduling but never to the point of making it useless to schedule anything.

If you look at the documentation the trigger is set by a window of time, not by a specific time:

.setTrigger(Trigger.executionWindow(0, 60))

It should work when the device enters a maintenance window.

0
MarGin On

The usual case, the job dispatcher will work. But it's not that reliable in Devices like Xiaomi, Oppo, Lenovo ... The service gets killed after some time when the device is idle. You can Whitelist your app from Doze mode by ignoring battery optimization but still, There are chances for it will not work . So for a video call application.. you have to rethink about your decisions