Przewodnik po integracji pakietu Engage SDK z telewizorami

Funkcja Kontynuuj oglądanie korzysta z klastra kontynuacji, aby wyświetlać niedokończone filmy i kolejne odcinki z tego samego sezonu serialu z różnych aplikacji w jednej grupie interfejsu. Możesz wyróżnić ich podmioty w tym klastrze kontynuacji. Z tego przewodnika dowiesz się, jak zwiększyć zaangażowanie użytkowników dzięki funkcji „Oglądaj dalej” za pomocą pakietu Engage SDK.

Przygotowanie

Zanim zaczniesz, wykonaj te czynności:

  1. zaktualizować docelowy interfejs API do wersji 19 lub nowszej.

  2. Dodaj bibliotekę com.google.android.engage do aplikacji:

    Do integracji możesz użyć oddzielnych pakietów SDK: jednego do aplikacji mobilnych i jednego do aplikacji na telewizory.

    Telefon

    
      dependencies {
        implementation 'com.google.android.engage:engage-core:1.5.5
      }
    

    TV

    
      dependencies {
        implementation 'com.google.android.engage:engage-tv:1.0.2
      }
    
  3. W pliku AndroidManifest.xml ustaw środowisko usługi Engage na produkcyjne.

    Telefon

    
    <meta-data
        android:name="com.google.android.engage.service.ENV"
        android:value="PRODUCTION" />
    

    TV

    
    <meta-data
        android:name="com.google.android.engage.service.ENV"
        android:value="PRODUCTION" />
    
  4. Dodaj uprawnienia dla WRITE_EPG_DATA w przypadku pliku APK na telewizor

    <uses-permission android:name="com.android.providers.tv.permission.WRITE_EPG_DATA" />
    
  5. Weryfikuj publikowanie wiarygodnych treści za pomocą usługi działającej w tle, takiej jak androidx.work, do planowania.

  6. Aby zapewnić płynne oglądanie, publikuj dane dotyczące kontynuowania oglądania, gdy wystąpią te zdarzenia:

    1. Pierwsze logowanie: gdy użytkownik loguje się po raz pierwszy, opublikuj dane, aby jego historia oglądania była od razu dostępna.
    2. Tworzenie lub przełączanie profili (aplikacje z wieloma profilami): jeśli aplikacja obsługuje wiele profili, publikuj dane, gdy użytkownik tworzy lub przełącza profile.
    3. Przerwanie odtwarzania filmu: aby ułatwić użytkownikom powrót do miejsca, w którym skończyli oglądać film, publikuj dane, gdy wstrzymują lub zatrzymują film albo gdy zamykają aplikację podczas odtwarzania.
    4. Aktualizacje sekcji „Oglądaj dalej” (jeśli jest obsługiwana): gdy użytkownik usunie element z sekcji „Oglądaj dalej”, odzwierciedlaj tę zmianę, publikując zaktualizowane dane.
    5. Ukończenie filmu:
      1. W przypadku filmów usuń obejrzany film z sekcji Oglądaj dalej. Jeśli film jest częścią serii, dodaj kolejny film, aby utrzymać zaangażowanie użytkownika.
      2. W przypadku odcinków usuń ukończony odcinek i dodaj kolejny odcinek z serii, jeśli jest dostępny, aby zachęcić do dalszego oglądania.

Kod demonstracyjny

Ta przykładowa aplikacja pokazuje, jak deweloperzy mogą integrować się z interfejsami API do odkrywania filmów, aby wysyłać do Google spersonalizowane dane użytkowników. Przykładowa aplikacja pokazuje też, jak utworzyć wspólny moduł, który można zaimportować zarówno w aplikacjach mobilnych, jak i na telewizory, kiedy wywoływać interfejsy API publikowania i usuwania oraz jak używać procesów roboczych do wywoływania tych interfejsów.

Integracja

AccountProfile

Aby umożliwić spersonalizowane „kontynuowanie oglądania” w Google TV, podaj informacje o koncie i profilu. Użyj AccountProfile, aby podać:

  1. Identyfikator konta: unikalny identyfikator konta użytkownika w Twojej aplikacji. Może to być rzeczywisty identyfikator konta lub odpowiednio zamaskowana wersja.

  2. Identyfikator profilu (opcjonalnie): jeśli Twoja aplikacja obsługuje wiele profili w ramach jednego konta, podaj unikalny identyfikator konkretnego profilu użytkownika (ponownie, prawdziwy lub zaciemniony).

// If your app only supports account
val accountProfile = AccountProfile.Builder()
    .setAccountId("your_users_account_id")
    .build()

// If your app supports both account and profile
val accountProfile = AccountProfile.Builder()
    .setAccountId("your_users_account_id")
    .setProfileId("your_users_profile_id")
    .build()

Tworzenie encji

Pakiet SDK ma zdefiniowane różne obiekty reprezentujące każdy typ produktu. Klaster Continuation obsługuje te jednostki:

  1. MovieEntity
  2. TvEpisodeEntity
  3. LiveStreamingVideoEntity
  4. VideoClipEntity

Określ identyfikatory URI i obrazy plakatu dla tych elementów na poszczególnych platformach.

Utwórz też identyfikatory URI odtwarzania dla każdej platformy, np. Android TV, Android lub iOS, jeśli jeszcze tego nie zrobiono. Gdy użytkownik kontynuuje oglądanie na każdej platformie, aplikacja używa docelowego identyfikatora URI odtwarzania, aby odtworzyć treści wideo.

// Required. Set this when you want continue watching entities to show up on
// Google TV
val playbackUriTv = PlatformSpecificUri.Builder()
    .setPlatformType(PlatformType.TYPE_ANDROID_TV)
    .setActionUri(Uri.parse("https://www.example.com/entity_uri_for_tv"))
    .build()

// Required. Set this when you want continue watching entities to show up on
// Google TV Android app, Entertainment Space, Playstore Widget
val playbackUriAndroid = PlatformSpecificUri.Builder()
    .setPlatformType(PlatformType.TYPE_ANDROID_MOBILE)
    .setActionUri(Uri.parse("https://www.example.com/entity_uri_for_android"))
    .build()

// Optional. Set this when you want continue watching entities to show up on
// Google TV iOS app
val playbackUriIos = PlatformSpecificUri.Builder()
    .setPlatformType(PlatformType.TYPE_IOS)
    .setActionUri(Uri.parse("https://www.example.com/entity_uri_for_ios"))
    .build()

val platformSpecificPlaybackUris =
    Arrays.asList(playbackUriTv, playbackUriAndroid, playbackUriIos)

Obrazy plakatu wymagają identyfikatora URI i wymiarów w pikselach (wysokości i szerokości). Kieruj reklamy na różne urządzenia, przesyłając wiele obrazów plakatu, ale upewnij się, że wszystkie obrazy mają współczynnik proporcji 16:9 i minimalną wysokość 200 pikseli, aby zapewnić prawidłowe wyświetlanie elementu „Oglądaj dalej”, zwłaszcza w Entertainment Space Google. Obrazy o wysokości mniejszej niż 200 pikseli mogą się nie wyświetlać.

val images = Arrays.asList(
    Image.Builder()
        .setImageUri(Uri.parse("http://www.example.com/entity_image1.png"))
        .setImageHeightInPixel(300)
        .setImageWidthInPixel(169)
        .build(),
    Image.Builder()
        .setImageUri(Uri.parse("http://www.example.com/entity_image2.png"))
        .setImageHeightInPixel(640)
        .setImageWidthInPixel(360)
        .build()
    // Consider adding other images for different form factors
)
MovieEntity

Ten przykład pokazuje, jak utworzyć MovieEntity ze wszystkimi wymaganymi polami:

val movieEntity = MovieEntity.Builder()
   .setWatchNextType(WatchNextType.TYPE_CONTINUE)
   .setName("Movie name")
   .addPlatformSpecificPlaybackUri(platformSpecificPlaybackUris)
   .addPosterImages(images)
   // Timestamp in millis for sample last engagement time 12/1/2023 00:00:00
   .setLastEngagementTimeMillis(1701388800000)
   // Suppose the duration is 2 hours, it is 72000000 in milliseconds
   .setDurationMills(72000000)
   // Suppose last playback offset is 1 hour, 36000000 in milliseconds
   .setLastPlayBackPositionTimeMillis(36000000)
   .build()

Podanie szczegółów, takich jak gatunki i oceny treści, umożliwia Google TV prezentowanie Twoich treści w bardziej dynamiczny sposób i łączenie ich z odpowiednimi widzami.

val genres = Arrays.asList("Action", "Science fiction")
val rating1 = RatingSystem.Builder().setAgencyName("MPAA").setRating("PG-13").build()
val contentRatings = Arrays.asList(rating1)
val movieEntity = MovieEntity.Builder()
    ...
    .addGenres(genres)
    .addContentRatings(contentRatings)
    .build()

Jednostki pozostają automatycznie dostępne przez 60 dni, chyba że określisz krótszy czas wygaśnięcia. Niestandardowy okres ważności należy ustawić tylko wtedy, gdy chcesz, aby element został usunięty przed upływem domyślnego okresu.

// Set the expiration time to be now plus 30 days in milliseconds
val expirationTime = DisplayTimeWindow.Builder()
    .setEndTimestampMillis(now().toMillis()+2592000000).build()
val movieEntity = MovieEntity.Builder()
    ...
    .addAvailabilityTimeWindow(expirationTime)
    .build()
TvEpisodeEntity

Ten przykład pokazuje, jak utworzyć element TvEpisodeEntity ze wszystkimi wymaganymi polami:

val tvEpisodeEntity = TvEpisodeEntity.Builder()
    .setWatchNextType(WatchNextType.TYPE_CONTINUE)
    .setName("Episode name")
    .addPlatformSpecificPlaybackUri(platformSpecificPlaybackUris)
    .addPosterImages(images)
    // Timestamp in millis for sample last engagement time 12/1/2023 00:00:00
    .setLastEngagementTimeMillis(1701388800000)
    .setDurationMills(72000000) // 2 hours in milliseconds
    // 45 minutes and 15 seconds in milliseconds is 2715000
    .setLastPlayBackPositionTimeMillis(2715000)
    .setEpisodeNumber("2")
    .setSeasonNumber("1")
    .setShowTitle("Title of the show")
    .build()

Ciąg numeru odcinka (np. "2") i ciąg numeru sezonu (np. "1") zostaną rozwinięte do odpowiedniej formy przed wyświetleniem na karcie „Kontynuuj oglądanie”. Pamiętaj, że powinny to być ciągi znaków numerycznych. Nie wpisuj „e2”, „episode 2”, „s1” ani „season 1”.

Jeśli dany serial telewizyjny ma tylko 1 sezon, ustaw numer sezonu na 1.

Aby zwiększyć szanse na to, że widzowie znajdą Twoje treści w Google TV, rozważ podanie dodatkowych danych, takich jak gatunki, oceny treści i okresy dostępności, ponieważ te szczegóły mogą ulepszyć wyświetlanie i opcje filtrowania.

val genres = Arrays.asList("Action", "Science fiction")
val rating1 = RatingSystem.Builder().setAgencyName("MPAA").setRating("PG-13").build()
val contentRatings = Arrays.asList(rating1)
val tvEpisodeEntity = TvEpisodeEntity.Builder()
    ...
    .addGenres(genres)
    .addContentRatings(contentRatings)
    .setSeasonTitle("Season Title")
    .setShowTitle("Show Title")
    .build()
VideoClipEntity

Oto przykład tworzenia VideoClipEntity ze wszystkimi wymaganymi polami.

VideoClipEntity – klip wygenerowany przez użytkownika, np. film w YouTube.

val videoClipEntity = VideoClipEntity.Builder()
    .setPlaybackUri(Uri.parse("https://www.example.com/uri_for_current_platform")
    .setWatchNextType(WatchNextType.TYPE_CONTINUE)
    .setName("Video clip name")
    .addPlatformSpecificPlaybackUri(platformSpecificPlaybackUris)
    .addPosterImages(images)
    // Timestamp in millis for sample last engagement time 12/1/2023 00:00:00
    .setLastEngagementTimeMillis(1701388800000)
    .setDurationMills(600000) //10 minutes in milliseconds
    .setLastPlayBackPositionTimeMillis(300000) //5 minutes in milliseconds
    .addContentRating(contentRating)
    .build()

Możesz opcjonalnie ustawić twórcę, obraz twórcy, czas utworzenia w milisekundach lub okno czasowe dostępności .

LiveStreamingVideoEntity

Oto przykład tworzenia LiveStreamingVideoEntity ze wszystkimi wymaganymi polami.

val liveStreamingVideoEntity = LiveStreamingVideoEntity.Builder()
    .setPlaybackUri(Uri.parse("https://www.example.com/uri_for_current_platform")
    .setWatchNextType(WatchNextType.TYPE_CONTINUE)
    .setName("Live streaming name")
    .addPlatformSpecificPlaybackUri(platformSpecificPlaybackUris)
    .addPosterImages(images)
    // Timestamp in millis for sample last engagement time 12/1/2023 00:00:00
    .setLastEngagementTimeMillis(1701388800000)
    .setDurationMills(72000000) //2 hours in milliseconds
    .setLastPlayBackPositionTimeMillis(36000000) //1 hour in milliseconds
    .addContentRating(contentRating)
    .build()

Opcjonalnie możesz ustawić czas rozpoczęcia, nadawcę, ikonę nadawcy lub przedział czasu dostępności dla elementu transmisji na żywo.

Szczegółowe informacje o atrybutach i wymaganiach znajdziesz w dokumentacji interfejsu API.

Podaj dane klastra kontynuacji

AppEngagePublishClient odpowiada za publikowanie klastra kontynuacji. Do publikowania obiektu publishContinuationCluster() używasz metody publishContinuationCluster().ContinuationCluster

Najpierw użyj funkcji isServiceAvailable(), aby sprawdzić, czy usługa jest dostępna do integracji.

client.publishContinuationCluster(
    PublishContinuationClusterRequest
        .Builder()
        .setContinuationCluster(
            ContinuationCluster.Builder()
                .setAccountProfile(accountProfile)
                .addEntity(movieEntity1)
                .addEntity(movieEntity2)
                .addEntity(tvEpisodeEntity1)
                .addEntity(tvEpisodeEntity2)
                .setSyncAcrossDevices(true)
                .build()
        )
        .build()
)

Gdy usługa otrzyma żądanie, w ramach jednej transakcji zostaną wykonane te działania:

  • Istniejące dane ContinuationCluster od partnera dewelopera zostaną usunięte.
  • Dane z żądania są analizowane i zapisywane w zaktualizowanym ContinuationCluster.

W przypadku błędu całe żądanie jest odrzucane, a dotychczasowy stan jest zachowywany.

Interfejsy API publikowania to interfejsy API typu upsert, które zastępują istniejące treści. Jeśli musisz zaktualizować konkretny element w obiekcie ContinuationCluster, musisz ponownie opublikować wszystkie elementy.

Dane ContinuationCluster powinny być podawane tylko w przypadku kont osób dorosłych. Publikuj tylko wtedy, gdy profil konta należy do osoby dorosłej.

Synchronizacja na różnych urządzeniach

Flaga SyncAcrossDevices określa, czy dane ContinuationCluster użytkownika mają być synchronizowane na różnych urządzeniach, takich jak telewizor, telefon, tablet itp. Synchronizacja między urządzeniami jest domyślnie wyłączona.

Wartości:

  • true: dane ContinuationCluster są udostępniane na wszystkich urządzeniach użytkownika, aby zapewnić płynne oglądanie. Zdecydowanie zalecamy tę opcję, aby zapewnić jak najlepsze wrażenia na różnych urządzeniach.
  • false: Dane ContinuationCluster są ograniczone do bieżącego urządzenia.

Aplikacja multimedialna musi zawierać wyraźne ustawienie umożliwiające włączanie i wyłączanie synchronizacji na różnych urządzeniach. Wyjaśnij użytkownikowi korzyści i zapisz jego preferencje, aby zastosować je w funkcji publishContinuationCluster.

// Example to allow cross device syncing.
client.publishContinuationCluster(
    PublishContinuationClusterRequest
        .Builder()
        .setContinuationCluster(
            ContinuationCluster.Builder()
                .setAccountProfile(accountProfile)
                .setSyncAcrossDevices(true)
                .build()
        )
        .build()
)

Aby w pełni wykorzystać funkcję na różnych urządzeniach, sprawdź, czy aplikacja uzyskuje zgodę użytkownika, i włącz SyncAcrossDevices, aby true. Dzięki temu treści mogą być płynnie synchronizowane na różnych urządzeniach, co zwiększa wygodę użytkowników i ich zaangażowanie. Na przykład partner, który wdrożył tę funkcję, odnotował wzrost liczby kliknięć „Oglądaj dalej” o 40% dzięki temu, że jego treści były wyświetlane na wielu urządzeniach.

Usuwanie danych dotyczących reklam wideo Discovery

Aby ręcznie usunąć dane użytkownika z serwera Google TV przed upływem standardowego 60-dniowego okresu przechowywania, użyj metody client.deleteClusters(). Po otrzymaniu prośby usługa usunie wszystkie dotychczasowe dane dotyczące odkrywania filmów z profilu konta lub z całego konta.

Wyliczenie DeleteReason określa przyczynę usunięcia danych. Poniższy kod usuwa dane „Oglądaj dalej” po wylogowaniu.


// If the user logs out from your media app, you must make the following call
// to remove continue watching data from the current google TV device,
// otherwise, the continue watching data will persist on the current
// google TV device until 60 days later.
client.deleteClusters(
    DeleteClustersRequest.Builder()
        .setAccountProfile(AccountProfile())
        .setReason(DeleteReason.DELETE_REASON_USER_LOG_OUT)
        .setSyncAcrossDevices(true)
        .build()
)

Testowanie

Użyj aplikacji weryfikacyjnej, aby sprawdzić, czy integracja pakietu Engage SDK działa prawidłowo. Aplikacja weryfikacyjna udostępnia narzędzia, które pomagają weryfikować dane i potwierdzać, że intencje transmisji są prawidłowo obsługiwane.

Po wywołaniu interfejsu API publikowania sprawdź, czy dane są prawidłowo publikowane, korzystając z aplikacji weryfikacyjnej. Klaster kontynuacji powinien być wyświetlany jako osobny wiersz w interfejsie aplikacji.

  • Ustaw Engage Service Flag tylko w przypadku wersji nieprodukcyjnych w pliku manifestu Androida aplikacji.
  • Zainstaluj i otwórz aplikację Engage Verify.
  • Jeśli isServiceAvailable ma wartość false, kliknij przycisk „Przełącz”, aby włączyć.
  • Wpisz nazwę pakietu aplikacji, aby automatycznie wyświetlać opublikowane dane po rozpoczęciu publikowania.
  • Przetestuj te działania w aplikacji:
    • Zaloguj się.
    • Przełącz się między profilami(jeśli to możliwe).
    • Rozpocznij, a następnie wstrzymaj odtwarzanie filmu lub wróć na stronę główną.
    • Zamknij aplikację podczas odtwarzania filmu.
    • Usuń element z wiersza „Oglądaj dalej” (jeśli jest obsługiwany).
  • Po każdej czynności sprawdź, czy aplikacja wywołała interfejs APIpublishContinuationClusters i czy dane są prawidłowo wyświetlane w aplikacji weryfikacyjnej.
  • Aplikacja weryfikacyjna wyświetli zielony znacznik „Wszystko w porządku” w przypadku prawidłowo zaimplementowanych podmiotów.

    Zrzut ekranu aplikacji weryfikacyjnej
    Rysunek 1. Weryfikacja aplikacji zakończona sukcesem
  • Aplikacja weryfikacyjna oznaczy wszystkie problematyczne elementy.

    Zrzut ekranu z błędem aplikacji do weryfikacji
    Rysunek 2. Błąd aplikacji weryfikacyjnej
  • Aby rozwiązać problemy z elementami, użyj pilota do telewizora, aby wybrać i kliknąć element w aplikacji weryfikacyjnej. Konkretne problemy zostaną wyświetlone i wyróżnione na czerwono (patrz przykład poniżej).

    Szczegóły błędu aplikacji do weryfikacji
    Rysunek 3. Szczegóły błędu aplikacji do weryfikacji

API REST

Pakiet Engage SDK udostępnia interfejs REST API, który zapewnia spójne działanie funkcji „Oglądaj dalej” na platformach innych niż Android, takich jak iOS czy Roku TV. Interfejs API umożliwia deweloperom aktualizowanie stanu „Oglądaj dalej” w przypadku użytkowników, którzy wyrazili zgodę na tę funkcję, na platformach innych niż Android.

Wymagania wstępne

  • Najpierw musisz zakończyć integrację opartą na pakiecie SDK Engage na urządzeniu. Ten ważny krok tworzy niezbędne powiązanie między identyfikatorem użytkownika Google a AccountProfile aplikacji.
  • Dostęp do interfejsu API i uwierzytelnianie: aby wyświetlić i włączyć interfejs API w projekcie Google Cloud, musisz przejść proces dodawania do listy dozwolonych. Wszystkie żądania interfejsu API wymagają uwierzytelnienia.

Uzyskiwanie dostępu

Aby uzyskać dostęp do interfejsu API w konsoli Google Cloud i móc go włączyć, musisz zarejestrować swoje konto.

  1. Identyfikator klienta Google Workspace powinien być dostępny. Jeśli nie jest dostępny, może być konieczne skonfigurowanie Google Workspace oraz kont Google, których chcesz używać do wywoływania interfejsu API.
  2. Skonfiguruj konto w Google Cloud Console, używając adresu e-mail powiązanego z Google Workspace.
  3. Tworzenie nowego projektu
  4. Utwórz konto usługi do uwierzytelniania interfejsu API. Po utworzeniu konta usługi będziesz mieć 2 elementy:
    • Identyfikator konta usługi.
    • Plik JSON z kluczem konta usługi. Chroń ten plik, ponieważ będzie on później potrzebny do uwierzytelniania klienta w interfejsie API.
  5. Workspace i powiązane z nim konta Google mogą teraz korzystać z interfejsów API REST. Gdy zmiana zostanie wprowadzona, otrzymasz powiadomienie o tym, czy interfejs API jest gotowy do wywoływania przez Twoje konta usługi.
  6. Aby przygotować się do wykonania wywołania delegowanego interfejsu API, wykonaj te czynności.

Publikowanie klastra kontynuacji

Aby opublikować dane dotyczące reklam wideo Discovery, wyślij żądanie POST do interfejsu APIpublishContinuationCluster, używając tej składni:

https://tvvideodiscovery.googleapis.com/v1/packages/{package_name}/accounts/{account_id}/profiles/{profile_id}/publishContinuationCluster

Gdzie:

  • package_name: nazwa pakietu dostawcy multimediów.
  • accountId: unikalny identyfikator konta użytkownika w Twoim systemie. Musi on odpowiadać accountId używanemu w ścieżce na urządzeniu.
  • profileId: unikalny identyfikator profilu użytkownika na koncie w Twoim systemie. Musi odpowiadać identyfikatorowi profileId używanemu w ścieżce na urządzeniu.

Adres URL konta bez profilu to:

https://tvvideodiscovery.googleapis.com/v1/packages/{package_name}/accounts/{account_id}/publishContinuationCluster

Ładunek żądania jest przedstawiony w polu entities. entities reprezentuje listę elementów treści, które mogą być MovieEntity lub TVEpisodeEntity. To pole jest wymagane.

Treść żądania

Pole

Typ

Wymagany

Opis

encje,

Lista obiektów MediaEntity

Tak

Lista elementów treści (maksymalnie 5). Zachowywanych jest tylko 5 najważniejszych elementów, a pozostałe są usuwane. Pusta lista oznacza, że użytkownik obejrzał już wszystkie elementy.

Pole entities zawiera poszczególne wartości movieEntitytvEpisodeEntity.

Pole

Typ

Wymagany

Opis

movieEntity

MovieEntity

Tak

Obiekt reprezentujący film w obiekcie ContinuationCluster.

tvEpisodeEntity

TvEpisodeEntity

Tak

Obiekt reprezentujący odcinek serialu w ramach ContinuationCluster.

Każdy obiekt w tablicy entities musi być jednym z dostępnych typów MediaEntity, czyli MovieEntityTvEpisodeEntity, a także zawierać pola wspólne i specyficzne dla danego typu.

Poniższy fragment kodu przedstawia ładunek treści żądania dla interfejsu API publishContinuationCluster.

{
  "entities": [
    {
      "movieEntity": {
        "watch_next_type": "WATCH_NEXT_TYPE_CONTINUE",
        "name": "Movie1",
        "platform_specific_playback_uris": [
          "https://www.example.com/entity_uri_for_android",
          "https://www.example.com/entity_uri_for_iOS"
        ],
        "poster_images": [
          "http://www.example.com/movie1_img1.png",
          "http://www.example.com/movie1_imag2.png"
        ],
        "last_engagement_time_millis": 864600000,
        "duration_millis": 5400000,
        "last_play_back_position_time_millis": 3241111
      }
    },
    {
      "tvEpisodeEntity": {
        "watch_next_type": "WATCH_NEXT_TYPE_CONTINUE",
        "name": "TV SERIES EPISODE 1",
        "platform_specific_playback_uris": [
          "https://www.example.com/entity_uri_for_android",
          "https://www.example.com/entity_uri_for_iOS"
        ],
        "poster_images": [
          "http://www.example.com/episode1_img1.png",
          "http://www.example.com/episode1_imag2.png"
        ],
        "last_engagement_time_millis": 864600000,
        "duration_millis": 1800000,
        "last_play_back_position_time_millis": 2141231,
        "episode_display_number": "1",
        "season_number": "1",
        "show_title": "title"
      }
    }
  ]
}

Usuwanie danych dotyczących odkrywania filmów

Użyj clearClustersinterfejsu API, aby usunąć dane dotyczące odkrywania filmów.

Użyj adresu URL POST, aby usunąć podmioty z danych o odkrywaniu filmów. Aby usunąć dane klastra kontynuacji, wyślij żądanie POST do interfejsu APIclearClusters, używając tej składni:

https://tvvideodiscovery.googleapis.com/v1/packages/{package_name}/accounts/{account_id}/profiles/{profile_id}/clearClusters

Gdzie:

  • package_name: nazwa pakietu dostawcy multimediów.
  • accountId: unikalny identyfikator konta użytkownika w Twoim systemie. Musi on odpowiadać accountId używanemu w ścieżce na urządzeniu.
  • profileId: unikalny identyfikator profilu użytkownika na koncie w Twoim systemie. Musi odpowiadać identyfikatorowi profileId używanemu w ścieżce na urządzeniu.

Ładunek interfejsu clearClusters API zawiera tylko jedno pole reason, które zawiera DeleteReason określający przyczynę usunięcia danych.

{
  "reason": "DELETE_REASON_LOSS_OF_CONSENT"
}

Testowanie

Po przesłaniu danych użyj testowego konta użytkownika, aby sprawdzić, czy oczekiwane treści pojawiają się w wierszu „Oglądaj dalej” na docelowych platformach Google, takich jak Google TV oraz aplikacje mobilne Google TV na Androida i iOS.

Podczas testowania uwzględnij rozsądne opóźnienie propagacji wynoszące kilka minut i przestrzegaj wymagań dotyczących oglądania, takich jak obejrzenie części filmu lub odcinka. Szczegółowe informacje znajdziesz w wytycznych dotyczących funkcji „Obejrzyj następny” dla programistów aplikacji.

Pobierz

Przed pobraniem musisz zaakceptować poniższe warunki.

Warunki korzystania z usługi

This is the Android Software Development Kit License Agreement

1. Introduction

1.1 The Android Software Development Kit (referred to in the License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK. 1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: https://source.android.com/, as updated from time to time. 1.3 A "compatible implementation" means any Android device that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (https://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS). 1.4 "Google" means Google LLC, organized under the laws of the State of Delaware, USA, and operating under the laws of the USA with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA.

2. Accepting this License Agreement

2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement. 2.2 By clicking to accept and/or using this SDK, you hereby agree to the terms of the License Agreement. 2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries, including the country in which you are resident or from which you use the SDK. 2.4 If you are agreeing to be bound by the License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity.

3. SDK License from Google

3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to develop applications for compatible implementations of Android. 3.2 You may not use this SDK to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this SDK is not used for that purpose. 3.3 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you. 3.4 You may not use the SDK for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK. 3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. 3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you. 3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features. 3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.

4. Use of the SDK by You

4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications. 4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) the License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries). 4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so. 4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier. 4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so. 4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.

5. Your Developer Credentials

5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.

6. Privacy and Information

6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected. 6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy, which is located at the following URL: https://policies.google.com/privacy 6.3 Anonymized and aggregated sets of the data may be shared with Google partners to improve the SDK.

7. Third Party Applications

7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources. 7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners. 7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, the License Agreement does not affect your legal relationship with these third parties.

8. Using Android APIs

8.1 Google Data APIs 8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service. 8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so. If you use the Android Recognition Service API, documented at the following URL: https://developer.android.com/reference/android/speech/RecognitionService, as updated from time to time, you acknowledge that the use of the API is subject to the Data Processing Addendum for Products where Google is a Data Processor, which is located at the following URL: https://privacy.google.com/businesses/gdprprocessorterms/, as updated from time to time. By clicking to accept, you hereby agree to the terms of the Data Processing Addendum for Products where Google is a Data Processor.

9. Terminating this License Agreement

9.1 The License Agreement will continue to apply until terminated by either you or Google as set out below. 9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials. 9.3 Google may at any time, terminate the License Agreement with you if: (A) you have breached any provision of the License Agreement; or (B) Google is required to do so by law; or (C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or (D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable. 9.4 When the License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst the License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.

10. DISCLAIMER OF WARRANTIES

10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE. 10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. 10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.

11. LIMITATION OF LIABILITY

11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.

12. Indemnification

12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with the License Agreement.

13. Changes to the License Agreement

13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available. 14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK. 14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google. 14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable. 14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement. 14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE. 14.6 The rights granted in the License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under the License Agreement without the prior written approval of the other party. 14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction. July 27, 2021
Pobierz

verify_app_multiplatform_public_20250602.apk