UserDataFeed Class
- java.
lang. Object - NativeBase
- com.
microsoft. connecteddevices. userdata. UserDataFeed
- com.
public class UserDataFeed
This class is responsible for synchronizing user-specific data with the Connected Devices Platform backend.
Method Summary
Modifier and Type | Method and Description |
---|---|
int |
getDaysToSync()
Get the number of days to sync. |
User |
getForAccount(@NonNull ConnectedDevicesAccount userConnectedDevicesAccount, @NonNull ConnectedDevicesPlatform platform, @NonNull String activitySourceHost)
Creates and initializes a new instance of this class with a user account, platform instance, and the cross-platform app ID. |
User |
getSyncStatus()
Gets the current status of user data synchronization. |
void |
setDaysToSync(@IntRange(from=0) int daysToSync)
Set the number of days to sync. |
void |
startSync()
Starts the synchronization process with the Connected Devices Platform. During this operation, change events will be raised. |
Async |
subscribeToSyncScopesAsync(@NonNull Collection<UserDataFeedSyncScope> syncScopes)
Adds **UserDataFeedSyncScope** instances to this UserDataFeed. This UserDataFeed is synchronized according to the **UserDataFeedSyncScope** instances specified. |
Async |
subscribeToSyncScopesWithResultAsync( @NonNull Collection<UserDataFeedSyncScope> syncScopes)
Adds **UserDataFeedSyncScope** instances to this UserDataFeed. This UserDataFeed is synchronized according to the **UserDataFeedSyncScope** instances specified. |
Event<User |
syncStatusChanged()
Event for when the sync status of the UserDataFeed changes. |
Method Details
getDaysToSync
public int getDaysToSync()
Get the number of days to sync.
Returns:
getForAccount
public static UserDataFeed getForAccount(@NonNull ConnectedDevicesAccount userConnectedDevicesAccount, @NonNull ConnectedDevicesPlatform platform, @NonNull String activitySourceHost)
Creates and initializes a new instance of this class with a user account, platform instance, and the cross-platform app ID.
Parameters:
Returns:
getSyncStatus
public UserDataFeedSyncStatus getSyncStatus()
Gets the current status of user data synchronization.
Returns:
setDaysToSync
public void setDaysToSync(@IntRange(from=0) int daysToSync)
Set the number of days to sync.
Parameters:
startSync
public void startSync()
Starts the synchronization process with the Connected Devices Platform. During this operation, change events will be raised.
subscribeToSyncScopesAsync
public AsyncOperation
Adds **UserDataFeedSyncScope** instances to this UserDataFeed. This UserDataFeed is synchronized according to the **UserDataFeedSyncScope** instances specified.
Parameters:
Returns:
subscribeToSyncScopesWithResultAsync
public AsyncOperation
Adds **UserDataFeedSyncScope** instances to this UserDataFeed. This UserDataFeed is synchronized according to the **UserDataFeedSyncScope** instances specified.
Parameters:
Returns:
syncStatusChanged
public Event
Event for when the sync status of the UserDataFeed changes.
Returns: