ConnectedDevicesNotificationRegistrationManager Class

  • java.lang.Object
    • NativeBase
      • com.microsoft.connecteddevices.ConnectedDevicesNotificationRegistrationManager

public class ConnectedDevicesNotificationRegistrationManager

Manages push notification registration with the ConnectedDevicesPlatform for each account.

Method Summary

Modifier and Type Method and Description
ConnectedDevicesNotificationRegistrationState getNotificationRegistrationStateForAccount( @NonNull ConnectedDevicesAccount account)

Get the status of cloud registration for the given account.

Event<ConnectedDevicesNotificationRegistrationManager, ConnectedDevicesNotificationRegistrationStateChangedEventArgs> notificationRegistrationStateChanged()

Event for when the registration state changes for a given account. (from **IN_PROGRESS** to **SUCCEEDED**, for example).

AsyncOperation<ConnectedDevicesNotificationRegistrationResult> registerAsync( @NonNull ConnectedDevicesAccount account, @NonNull ConnectedDevicesNotificationRegistration notificationRegistration)

Register this application for this user with a push notification service so notification can be received by this user.

AsyncOperation<Boolean> registerForAccountAsync( @NonNull ConnectedDevicesAccount account, @NonNull ConnectedDevicesNotificationRegistration notificationRegistration)

Register this application for this user with a push notification service so notification can be received by this user.

Method Details

getNotificationRegistrationStateForAccount

public ConnectedDevicesNotificationRegistrationState getNotificationRegistrationStateForAccount( @NonNull ConnectedDevicesAccount account)

Get the status of cloud registration for the given account.

Parameters:

account - A ConnectedDevicesAccount to get the registration state for.

Returns:

A ConnectedDevicesNotificationRegistrationState stating what state registration is in.

notificationRegistrationStateChanged

public Event notificationRegistrationStateChanged()

Event for when the registration state changes for a given account. (from **IN_PROGRESS** to **SUCCEEDED**, for example).

Returns:

Event Subscription

registerAsync

public AsyncOperation registerAsync( @NonNull ConnectedDevicesAccount account, @NonNull ConnectedDevicesNotificationRegistration notificationRegistration)

Register this application for this user with a push notification service so notification can be received by this user.

Parameters:

account - The ConnectedDevicesAccount to perform the registration under.
notificationRegistration - The ConnectedDevicesNotificationRegistration contains the information required to perform the app's registration with a push notification service.

Returns:

An AsyncOperation<T> indicating if the registration completed successfully.

registerForAccountAsync

public AsyncOperation registerForAccountAsync( @NonNull ConnectedDevicesAccount account, @NonNull ConnectedDevicesNotificationRegistration notificationRegistration)

Register this application for this user with a push notification service so notification can be received by this user.

Parameters:

account - The ConnectedDevicesAccount to perform the registration under.
notificationRegistration - The ConnectedDevicesNotificationRegistration contains the information required to perform the app's registration with a push notification service.

Returns:

An AsyncOperation<T> for if the registration completed successfully.

Applies to