AggregatorManager

interface AggregatorManager<D, R, TResult>

Main entry point for Aggregator implementations.

Types

AggregatorListener
Link copied to clipboard
interface AggregatorListener
Listener for Aggregator Events
HistoryType
Link copied to clipboard
enum HistoryType : Enum<AggregatorManager.HistoryType>
PermissionsHandler
Link copied to clipboard
interface PermissionsHandler<D>

Functions

currentSubscriptions
Link copied to clipboard
abstract fun currentSubscriptions(): List<D>
disconnect
Link copied to clipboard
abstract fun disconnect()
Disconnect from the aggregator platform.
fetchHistory
Link copied to clipboard
open fun fetchHistory(historyType: AggregatorManager.HistoryType)
Fetch 180 previous days of data for a dataType,
abstract fun fetchHistory(historyType: AggregatorManager.HistoryType, from: LocalDate = LocalDate.now().minusDays(30), to: LocalDate = LocalDate.now())
Fetch a custom date range of historical data for a HistoryType
handlePermissionResult
Link copied to clipboard
open fun handlePermissionResult(activity: Activity, requestCode: Int, resultCode: Int, intent: Intent?)
Handles responses for requests to authorize the Validic Aggregator to access data from the end user's device Place in the activity's Activity.onActivityResult
hasDataAccess
Link copied to clipboard
abstract fun hasDataAccess(dataTypes: Set<D>): Map<D, Boolean>
Check if the Validic SDK has been granted permission by the end user to collect data for a set of data types
requestPermissions
Link copied to clipboard
abstract fun requestPermissions(activity: Activity, dataTypes: Set<D>, listener: AggregatorManager.PermissionsHandler<D>)
Request authorization to the aggregator platform from the end user.
subscribe
Link copied to clipboard
abstract fun subscribe(dataTypes: Set<D>)
Register to receive an update when data changes for a data typec.
unsubscribe
Link copied to clipboard
abstract fun unsubscribe(dataType: D)
Unregister from receiving data change updates for a data type.

Properties

listener
Link copied to clipboard
abstract var listener: AggregatorManager.AggregatorListener?
supportedDataTypes
Link copied to clipboard
abstract val supportedDataTypes: Set<D>
Supported set types that the underlying platform supports

Inheritors

ValidicFitManager
Link copied to clipboard