「接下來請看」屬性
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
在「接著播放」列中新增音訊或影片節目時,除了音訊和影片節目的屬性外,您還必須在下表中加入這些屬性。每個屬性都會連結至 WatchNextProgram.Builder
中的對應 setter。
屬性 |
附註 |
「接下來請看」類型 |
下列其中一個選項:
|
上次參與時間 |
使用者或應用程式上次與計畫互動的時間。
|
上次播放位置 |
只有 WATCH_NEXT_TYPE_CONTINUE 需要。 |
時間長度 |
只有 WATCH_NEXT_TYPE_CONTINUE 需要。 |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Watch Next attributes\n\nWhen you add an audio or video program to the **Play Next** row, you must include\nthe attributes in the following table in addition to the attributes for audio and\nvideo programs. Each attribute is linked to the corresponding setter in\n[`WatchNextProgram.Builder`](/reference/androidx/tvprovider/media/tv/WatchNextProgram.Builder).\n| **Note:** If you are integrating with the client-side [WatchNext API](/reference/androidx/tvprovider/media/tv/WatchNextProgram), you must populate and align the [Internal Provider ID](/reference/androidx/tvprovider/media/tv/WatchNextProgram.Builder#setInternalProviderId(java.lang.String)) with the internal ID you provide in the [Media Actions](https://developers.google.com/actions/media) feed. Doing so helps Android TV reconcile the asset more effectively and provides a high-confidence feature to users.\n\n\u003cbr /\u003e\n\n| Attribute | Notes |\n|--------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Watch Next Type](/reference/androidx/tvprovider/media/tv/WatchNextProgram.Builder#setWatchNextType(int)) | One of: - [`WATCH_NEXT_TYPE_CONTINUE`](/reference/androidx/tvprovider/media/tv/TvContractCompat.WatchNextPrograms#WATCH_NEXT_TYPE_CONTINUE()) - [`WATCH_NEXT_TYPE_NEXT`](/reference/androidx/tvprovider/media/tv/TvContractCompat.WatchNextPrograms#WATCH_NEXT_TYPE_NEXT()) - [`WATCH_NEXT_TYPE_NEW`](/reference/androidx/tvprovider/media/tv/TvContractCompat.WatchNextPrograms#WATCH_NEXT_TYPE_NEW()) - [`WATCH_NEXT_TYPE_WATCHLIST`](/reference/androidx/tvprovider/media/tv/TvContractCompat.WatchNextPrograms#WATCH_NEXT_TYPE_WATCHLIST()) |\n| [Last Enagagement Time](/reference/androidx/tvprovider/media/tv/WatchNextProgram.Builder#setLastEngagementTimeUtcMillis(long)) | The time the user or app last engaged with the program. |\n| [Last Playback Position](/reference/androidx/tvprovider/media/tv/WatchNextProgram.Builder#setLastPlaybackPositionMillis(int)) | Only required for `WATCH_NEXT_TYPE_CONTINUE`. |\n| [Duration](/reference/androidx/tvprovider/media/tv/WatchNextProgram.Builder#setDurationMillis(int)) | Only required for `WATCH_NEXT_TYPE_CONTINUE`. |\n\n\u003cbr /\u003e"]]