Salih M
Nov 29, 2018
10:09 am

Device with Doze Mode not receiving FCM

Hi , We are working in a process which uses FCM , but the devices entered into Doze Mode didnt receives and process FCM. Already tried 

ApplicationPolicy.addPackageToBatteryOptimizationWhiteList() 

But still the Device not responding to the FCM.

Android Version 7.0

Knox 2.8

Standard SDK 5.8.0

Is there any method restricts cpu from sleep ?

 

 

Similar topics

No similar topics found.
Jenna S.Samsung SEAP Moderator
Dec 05, 2018
10:50 pm

Hello Salih, 

The addPackageToBatteryOptimzationWhiteList API should whitelist the application from Doze Mode. Are you saying that this is not working for you?

-Jenna

Comments

Hi Jenna,

Thats correct addPackageToBatteryOptimzationWhiteList is not preventing the application from going into Doze Mode.

Thank you

Ashley

Ashley HurkooDec 06, 2018 at 3:21 am
Jenna S.Samsung SEAP Moderator
Dec 12, 2018
6:35 pm

Hello Ashley,

I tried to reproduce the issue but I was unable. I used the below methods to check if the application had been whitelisted, and it returned true.

PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
boolean status = pm.isIgnoringBatteryOptimizations(packageName);
Log.d("Optimization Status : "+status );

Is there anything indicating that the application is in Doze Mode other than that it does not respond to FCM? Could you please send us a dumpState after reproducing the issue?

Also, if you look at the android documentation on Doze Mode here, it states that FCM messages are optimized to work with Doze and App Standby modes. 

Best regards,

Jenna

Salih M
Dec 13, 2018
9:06 am

Hi Jenna ,

Here I am attaching the logs regarding our issue. 

https://drive.google.com/open?id=1Hk2OKYyWkhhwQ4mysPo-jooO19uVg5ZN

In this, the issue happens in time 18:13 we have send an FCM to the device , but the FCM processed in time 18:17 , so the delay is happening on time of doze mode.

Comments

Hello Salih,

The link you have posted is not working. Also, please make sure that the dumpState includes license activation and the API call.

Best regards,

Jenna

Jenna S.Dec 13, 2018 at 7:42 pm