mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Optimize FCM token refreshing
This commit is contained in:
parent
23fd74771a
commit
cedc8ab441
@ -62,7 +62,7 @@ public class FCMNotificationStrategy implements NotificationStrategy {
|
||||
Device device = FCMDataHolder.getInstance().getDeviceManagementProviderService()
|
||||
.getDeviceWithTypeProperties(ctx.getDeviceId());
|
||||
if(device.getProperties() != null && getFCMToken(device.getProperties()) != null) {
|
||||
FCMUtil.getInstance().getDefaultApplication().refresh();
|
||||
FCMUtil.getInstance().getDefaultApplication().refreshIfExpired();
|
||||
sendWakeUpCall(FCMUtil.getInstance().getDefaultApplication().getAccessToken().getTokenValue(),
|
||||
getFCMToken(device.getProperties()));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user