com.microsoft.connecteddevices

Classes

AsyncOperation<T>

An operation that has a future result of type T or a possible exception. This class is a slightly simplified version of the android api level 24 CompletableFuture class

Implements the standard Future interface, and also provides basic continuation functionality. Please see CompletableFuture for detailed information on the how to use this class.

The important differences between CompletableFuture and AsyncOperation are as follows: 1. AsyncOperation's default asynchronous executor is Executors.newCachedThreadPool() whereas CompletableFuture uses ForkJoinPool.commonPool(). 2. AsyncOperation lacks obtrudeException and obtrudeValue methods.

AsyncOperationWithProgress<T,P>

Version of AsyncOperation that can provide progress via the Progress event.

ConnectedDevicesAccessTokenInvalidatedEventArgs

Returned by ConnectedDevicesAccount to inform that the token associated with ConnectedDevicesAccount reported token error for the contained scopes. Token provider needs to either refresh their token cache or potentially pop up UI to ask user to sign in in order to fix their account setup.

ConnectedDevicesAccessTokenRequest

Request for an access token for the contained ConnectedDevicesAccount which satisfies the contained scopes. This request needs to completed by calling either completeWithAccessToken(@NonNull final String token) or completeWithErrorMessage(@NonNull final String error).

ConnectedDevicesAccessTokenRequestedEventArgs

Returned by ConnectedDevicesAccount fired when there is a need to request a token. Contains the ConnectedDevicesAccessTokenRequest.

ConnectedDevicesAccount

This class represents a single user account known by an app.

ConnectedDevicesAccountManager

Provides a single entrypoint for all account-related features in the SDK.

ConnectedDevicesAddAccountResult
ConnectedDevicesDiagnostics

Manages diagnostic information from the Connected Devices platform. Not intended for general use.

ConnectedDevicesNotification

Object that represents an incoming notification to be processed by the Connected Devices Platform

ConnectedDevicesNotificationRegistration

This class represents the app's registration with a push notification service (necessary for some Connected Devices scenarios). It conveys this information to the Connected Devices Platform.

ConnectedDevicesNotificationRegistrationManager

Manages push notification registration with the ConnectedDevicesPlatform for each account.

ConnectedDevicesNotificationRegistrationResult
ConnectedDevicesNotificationRegistrationStateChangedEventArgs

Event Args class for the RemoteSystemAppRegistration State Changed event. This is used as part of the ConnectedDevicesPlatform to ensure that the application gets informed about new ConnectedDevices messages via the correct notification mechanism.

ConnectedDevicesPlatform

A class to represent the Connected Devices Platform and manage the app's connection to it.

ConnectedDevicesPlatformSettings

Allows application developers to provide initial settings to the ConnectedDevices platform.

ConnectedDevicesProcessNotificationOperation

The result of giving a notification to the Rome platform for processing.

ConnectedDevicesRemoveAccountResult
SdkException

Exception used to communicate a failure from the Connected Devices Platform SDK. This is an unchecked exception that will be thrown for unexpected platform-related errors.

AsyncOperation.CompletionException

Unchecked exception that holds the exception that caused the operation to complete exceptionally.

Used like ExecutionException except that it is unchecked so that it can propagate to dependent operations without needing to know the full set of exceptions / requiring all exception observing continuations to declare that they may throw the ExecutionException.

Interfaces

Event<T,R>

This interface provides a simple eventing model. Events produce items consumed by EventListeners. The flow of event items is controlled by the EventSubscription.

EventListener<T,R>

This interface provides a simple event-handling method. It allows listeners to be registered to methods through the use of lambda expressions (available in Java 8). Because lambda expressions and anonymous classes allow implicit capture of variables in the enclosing scope, it is important to remember to either use WeakReferences or always ensure to call EventSubscription.cancel to ensure proper cleanup of resources.

EventSubscription

This interface provides a simple event subscription

AsyncOperation.ResultBiConsumer<T,U>

Represents an action to be invoked after an AsyncOperation is done. Notably, this functional interface is used when two invocation arguments are used like with AsyncOperation.whenComplete.

This is a functional interface equivalent to android's BiConsumer interface

AsyncOperation.ResultBiFunction<T,U,R>

Represents a function to be invoked after an AsyncOperation is done. Notably, this functional interface is used when only two arguments are needed and a result is produced, like with AsyncOperation.handleAsync

This is a functional interface equivalent to android's BiFunction interface

AsyncOperation.ResultConsumer<T>

Represents an action to be invoked after an AsyncOperation is done. Notably, this functional interface is used when only a single argument is needed like with AsyncOperation.thenAccept.

This is a functional interface equivalent to android's Consumer interface

AsyncOperation.ResultFunction<T,R>

Represents a function to be invoked after an AsyncOperation is done. Notably, this functional interface is used when only a singe argument is needed and a result is produced, like with AsyncOperation.thenApply

This is a functional interface equivalent to android's Function interface

AsyncOperation.Supplier<T>

Represents a function that supplies a T value (not necessarily new/distinct) when asked.

This is a functional interface equivalent to android's Supplier interface

Enums

ConnectedDevicesAccountAddedStatus

Contains the values that describe the add account operation status

ConnectedDevicesAccountType

Contains values that describe the type of Microsoft-provided user account.

ConnectedDevicesNotificationRegistrationState

Values used to communicate the status of cloud registration.

ConnectedDevicesNotificationRegistrationStatus

Contains the values that describe the notifcation registration operation status The error statuses indicate transient conditions where the app developer may want to retry registering.

ConnectedDevicesNotificationType

Contains values that describe the type (service) of a notification.