共用方式為


UserNotificationChannel 類別

  • java.lang.Object
    • NativeBase
      • com.microsoft.connecteddevices.userdata.usernotifications.UserNotificationChannel

public class UserNotificationChannel

這個類別提供通知變更讀取器,可處理應用程式的接收和管理使用者通知。

建構函式摘要

建構函式 Description
UserNotificationChannel(@NonNull UserDataFeed userDataFeed)

建立並初始化 UserNotificationChannel 的新實例

方法摘要

修飾詞與類型 方法與描述
UserNotificationReader createReader()

建立使用者通知讀取器,以接收及管理應用程式伺服器發佈的使用者通知。

UserNotificationReader createReaderWithOptions(@NonNull UserNotificationReaderOptions options)

使用選項建立使用者通知讀取器

UserNotificationReader createReaderWithState(@NonNull String serializedState)

建立使用者通知讀取器,以接收及管理應用程式伺服器發佈的使用者通知。 讀取器會從提供的追蹤狀態開始。

AsyncOperation<UserNotificationUpdateResult> deleteUserNotificationAsync(@NonNull String notificationId)

根據使用者的識別碼刪除使用者通知。

UserDataFeedSyncScope getSyncScope()

取得這個使用者通知通道的同步範圍。

AsyncOperation<UserNotification> getUserNotificationAsync(@NonNull String notificationId)

根據使用者的識別碼取得使用者通知。

建構函式詳細資料

UserNotificationChannel

public UserNotificationChannel(@NonNull UserDataFeed userDataFeed)

建立並初始化 UserNotificationChannel 的新實例

Parameters:

userDataFeed

方法詳細資料

createReader

public UserNotificationReader createReader()

建立使用者通知讀取器,以接收及管理應用程式伺服器發佈的使用者通知。

createReaderWithOptions

public UserNotificationReader createReaderWithOptions(@NonNull UserNotificationReaderOptions options)

使用選項建立使用者通知讀取器

Parameters:

options

createReaderWithState

public UserNotificationReader createReaderWithState(@NonNull String serializedState)

建立使用者通知讀取器,以接收及管理應用程式伺服器發佈的使用者通知。 讀取器會從提供的追蹤狀態開始。

Parameters:

serializedState

deleteUserNotificationAsync

public AsyncOperation deleteUserNotificationAsync(@NonNull String notificationId)

根據使用者的識別碼刪除使用者通知。

Parameters:

notificationId

getSyncScope

public static UserDataFeedSyncScope getSyncScope()

取得這個使用者通知通道的同步範圍。

getUserNotificationAsync

public AsyncOperation getUserNotificationAsync(@NonNull String notificationId)

根據使用者的識別碼取得使用者通知。

Parameters:

notificationId

適用於