Notifications
note
Whenever access point permissions are updated in the backend, it's crucial to invoke the designated function. This function serves to alert the client application of any permission changes. Subsequently, upon receiving this notification, the app must initiate the polling of data. This action triggers the SDK to fetch the updated permissions, ensuring synchronization between the backend changes and the client's access privileges.
CloudSyncManager syncManager = serviceProvider.getCloudSyncManager();
syncManager.pollData();
// Call this whenever you want to refresh the local sdk data with cloud
// The places to call this would be:
// 1. After login.
// 2. After changing the users permission (Notifications will be
implemented in a later release).
//To set up regular polling you can call the following function
PollingJobService.register(this, PollingJobService.DEFAULT_JOB_ID,
PollingJobService.DEFAULT_INTERVAL);
//This registers a scheduled job service with given interval and job id
// DEFAULT_INTERVAL = 8hrs
// DEFAULT_JOB_ID = 1