Freigeben über


ConnectedDevicesPlatform Klasse

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

public class ConnectedDevicesPlatform

Eine Klasse, die die Plattform für verbundene Geräte darstellt und die Verbindung der App damit verwaltet.

Zusammenfassung zum Konstruktor

Konstruktor Beschreibung
ConnectedDevicesPlatform(@NonNull Context context)

Erstellt und initialisiert eine neue Instanz dieser Klasse.

ConnectedDevicesPlatform(@NonNull Context context, @NonNull ConnectedDevicesPlatformSettings settings)

Erstellt und initialisiert eine neue Instanz dieser Klasse.

Methodenzusammenfassung

Modifizierer und Typ Methode und Beschreibung
ConnectedDevicesAccountManager getAccountManager()

Abrufen ConnectedDevicesAccountManager Instanz, die von der Plattform gehalten wird

ConnectedDevicesNotificationRegistrationManager getNotificationRegistrationManager()

Abrufen ConnectedDevicesNotificationRegistrationManager Instanz, die von der Plattform gehalten wird

ConnectedDevicesProcessNotificationOperation processNotification(@NonNull Bundle bundle)

Verarbeiten eingehender GCM-Benachrichtigungen

ConnectedDevicesProcessNotificationOperation processNotification(@NonNull Map map)

Verarbeiten eingehender FCM-Benachrichtigungen

AsyncOperation<Void> processNotificationAsync(@NonNull ConnectedDevicesNotification notification)

Verarbeiten eingehender Benachrichtigungen. Wenn die Benachrichtigung nicht für connectedDevicesPlatform gilt, wird die zurückgegebene AsyncOperation so schnell wie möglich asynchron abgeschlossen.

AsyncOperation<Void> shutdownAsync()

Beendet die Plattform für verbundene Geräte.

void start()

Starten der Plattform

Details zum Konstruktor

ConnectedDevicesPlatform

public ConnectedDevicesPlatform(@NonNull Context context)

Erstellt und initialisiert eine neue Instanz dieser Klasse.

Parameter:

context - Der Kontext der aufrufenden Anwendung. Dies ist erforderlich, um appspezifische Ressourcen für die ConnectedDevicesPlatformverfügbar zu machen.

ConnectedDevicesPlatform

public ConnectedDevicesPlatform(@NonNull Context context, @NonNull ConnectedDevicesPlatformSettings settings)

Erstellt und initialisiert eine neue Instanz dieser Klasse.

Parameter:

context - Der Kontext der aufrufenden Anwendung. Dies ist erforderlich, um appspezifische Ressourcen für verbundene Geräte ConnectedDevicesPlatform verfügbar zu machen.
settings - Die PlatformSettings zum Erstellen des Platform-Objekts mit

Details zur Methode

getAccountManager

public ConnectedDevicesAccountManager getAccountManager()

Abrufen ConnectedDevicesAccountManager Instanz, die von der Plattform gehalten wird

Gibt zurück:

AccountManager

getNotificationRegistrationManager

public ConnectedDevicesNotificationRegistrationManager getNotificationRegistrationManager()

Abrufen ConnectedDevicesNotificationRegistrationManager Instanz, die von der Plattform gehalten wird

Gibt zurück:

NotificationRegistrationManager

processNotification

public ConnectedDevicesProcessNotificationOperation processNotification(@NonNull Bundle bundle)

Verarbeiten eingehender GCM-Benachrichtigungen

Parameter:

bundle - Das Bündel, das von GcmListenerService.onMessageReceived empfangen wurde

Gibt zurück:

Ergebnis der Verarbeitung einer Benachrichtigung

processNotification

public ConnectedDevicesProcessNotificationOperation processNotification(@NonNull Map map)

Verarbeiten eingehender FCM-Benachrichtigungen

Parameter:

map - Das Bundle, das von FirebaseMessagingService.onMessageReceived empfangen wurde

Gibt zurück:

Ergebnis der Verarbeitung einer Benachrichtigung

processNotificationAsync

public AsyncOperation processNotificationAsync(@NonNull ConnectedDevicesNotification notification)

Verarbeiten eingehender Benachrichtigungen. Wenn die Benachrichtigung nicht für connectedDevicesPlatform gilt, wird die zurückgegebene AsyncOperation so schnell wie möglich asynchron abgeschlossen.

Parameter:

notification - The ConnectedDevicesNotification to process.

Gibt zurück:

Ein AsyncOperation-Vorgang, der angibt, wann die ConnectedDevicesPlatform-Verarbeitung dieser Benachrichtigung abgeschlossen ist.

shutdownAsync

public AsyncOperation shutdownAsync()

Beendet die Plattform für verbundene Geräte.

Gibt zurück:

Ein AsyncOperation<T>, der diesen Vorgang darstellt.

start

public void start()

Starten der Plattform

Gilt für: