Merge pull request #668 from warunalakshitha/master

Push notification scheduler Task
merge-requests/1/head
Geeth 8 years ago committed by GitHub
commit 5597d4370b

@ -20,7 +20,11 @@ package org.wso2.carbon.device.mgt.mobile.android.impl;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.DeviceManager;
import org.wso2.carbon.device.mgt.common.InitialOperationConfig;
import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager; import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager;
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
@ -94,7 +98,8 @@ public class AndroidDeviceManagementService implements DeviceManagementService {
HashMap<String, String> config = new HashMap<>(); HashMap<String, String> config = new HashMap<>();
config.put(FCM_API_KEY, this.getConfigProperty(configuration, FCM_API_KEY)); config.put(FCM_API_KEY, this.getConfigProperty(configuration, FCM_API_KEY));
config.put(FCM_SENDER_ID, this.getConfigProperty(configuration, FCM_SENDER_ID)); config.put(FCM_SENDER_ID, this.getConfigProperty(configuration, FCM_SENDER_ID));
return new PushNotificationConfig(AndroidPluginConstants.NotifierType.FCM, config); return new PushNotificationConfig(AndroidPluginConstants.NotifierType.FCM, false,
config);
} }
} }
} }

@ -51,9 +51,13 @@
<ProvisioningConfig> <ProvisioningConfig>
<SharedWithAllTenants>true</SharedWithAllTenants> <SharedWithAllTenants>true</SharedWithAllTenants>
</ProvisioningConfig> </ProvisioningConfig>
<!--
isScheduled element used to enable scheduler task to send push notification.
Task will send push notification as batches. So this will reduce sudden request burst when many devices try to
access server after receiving push notification.
-->
<!--Configuration for enable firebase push notifications--> <!--Configuration for enable firebase push notifications-->
<!--<PushNotificationProvider type="FCM">--> <!--<PushNotificationProvider type="FCM" isScheduled="false">-->
<!--</PushNotificationProvider>--> <!--</PushNotificationProvider>-->
<DataSource> <DataSource>

Loading…
Cancel
Save