Optimize FCM token refreshing

pull/557/head
Pahansith Gunathilake 2 months ago
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…
Cancel
Save