UserNotification 類別
- java.
lang. Object - NativeBase
- com.
microsoft. connecteddevices. userdata. usernotifications. UserNotification
- com.
public class UserNotification
這個類別代表單一使用者通知實例。 使用者通知是由以使用者為目標的應用程式伺服器所建立併發布,並散發至相同登入使用者的所有裝置端點。
建構函式摘要
建構函式 | Description | |
---|---|---|
UserNotification(NativeObject nativeObject) |
方法摘要
修飾詞與類型 | 方法與描述 |
---|---|
Date |
getChangeTime()
取得套用至此通知之最新變更的時間戳記。 |
String |
getContent()
取得此通知的內容承載,這是開發人員定義的任意資料。 |
Date |
getExpirationTime()
取得這個使用者通知的到期時間。 |
String |
getGroupId()
取得這個使用者通知的開發人員指定群組識別碼。 |
String |
getId()
取得此使用者通知的開發人員指定唯一識別碼。 |
User |
getPriority()
取得此使用者通知的開發人員指定優先權。 |
User |
getReadState()
取得這個使用者通知的讀取狀態值,指出通知已讀取或未讀取。 |
User |
getStatus()
取得這個使用者通知的狀態值,指出通知是否標示為永久刪除。 |
User |
getUserActionState()
取得使用者通知的使用者動作狀態值,以判斷通知是否未互動、關閉、啟用或已取消。 |
Async |
saveAsync()
發佈使用者通知變更時,應該呼叫此功能。 每當應用程式修改 UserNotification 的可更新屬性時,應該呼叫這個方法。 |
void |
setReadState(@NonNull UserNotificationReadState readState)
設定此使用者通知的讀取狀態,一旦進行變更並儲存將會發佈至所有裝置。 |
void |
setUserActionState(@NonNull UserNotificationUserActionState userActionState)
設定此使用者通知的使用者動作狀態,一旦進行並儲存變更就會發佈至所有裝置。 |
建構函式詳細資料
UserNotification
protected UserNotification(NativeObject nativeObject)
Parameters:
方法詳細資料
getChangeTime
public Date getChangeTime()
取得套用至此通知之最新變更的時間戳記。
getContent
public String getContent()
取得此通知的內容承載,這是開發人員定義的任意資料。
getExpirationTime
public Date getExpirationTime()
取得這個使用者通知的到期時間。
getGroupId
public String getGroupId()
取得這個使用者通知的開發人員指定群組識別碼。
getId
public String getId()
取得此使用者通知的開發人員指定唯一識別碼。
getPriority
public UserNotificationPriority getPriority()
取得此使用者通知的開發人員指定優先權。
getReadState
public UserNotificationReadState getReadState()
取得這個使用者通知的讀取狀態值,指出通知已讀取或未讀取。
getStatus
public UserNotificationStatus getStatus()
取得這個使用者通知的狀態值,指出通知是否標示為永久刪除。
getUserActionState
public UserNotificationUserActionState getUserActionState()
取得使用者通知的使用者動作狀態值,以判斷通知是否未互動、關閉、啟用或已取消。
saveAsync
public AsyncOperation
發佈使用者通知變更時,應該呼叫此功能。 每當應用程式修改 UserNotification 的可更新屬性時,應該呼叫這個方法。
setReadState
public void setReadState(@NonNull UserNotificationReadState readState)
設定此使用者通知的讀取狀態,一旦進行變更並儲存將會發佈至所有裝置。
Parameters:
setUserActionState
public void setUserActionState(@NonNull UserNotificationUserActionState userActionState)
設定此使用者通知的使用者動作狀態,一旦進行並儲存變更就會發佈至所有裝置。
Parameters: