Chia sẻ Quyền trong ứng dụng với Google TV bằng Engage SDK

Hướng dẫn này cung cấp cho nhà phát triển thông tin về cách chia sẻ dữ liệu về gói thuê bao và quyền của ứng dụng với Google TV bằng Engage SDK. Người dùng có thể tìm thấy nội dung mà họ có quyền truy cập và cho phép Google TV cung cấp các đề xuất nội dung có mức độ liên quan cao cho người dùng, ngay trong trải nghiệm Google TV trên TV, thiết bị di động và máy tính bảng.

Điều kiện tiên quyết

Bạn phải tham gia nguồn cấp dữ liệu hành động với nội dung nghe nhìn thì mới có thể sử dụng API quyền của thiết bị. Nếu bạn chưa hoàn tất, hãy hoàn tất quy trình tham gia nguồn cấp dữ liệu hành động đối với nội dung nghe nhìn.

Chuẩn bị trước

Trước khi bắt đầu, hãy hoàn tất các bước sau: Xác minh rằng ứng dụng của bạn nhắm đến API cấp 19 trở lên cho quá trình tích hợp này

  1. Thêm thư viện com.google.android.engage vào ứng dụng của bạn:

    Có các SDK riêng biệt để sử dụng trong quá trình tích hợp: một cho ứng dụng di động và một cho ứng dụng truyền hình.

    Dành cho thiết bị di động

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

    cho TV

    
      dependencies {
        implementation 'com.google.android.engage:engage-tv:1.0.2
      }
    
  2. Đặt môi trường dịch vụ Engage thành môi trường phát hành chính thức trong tệp AndroidManifest.xml.

    Đối với tệp apk di động

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

    Tệp APK cho TV

    
    <meta-data
        android:name="com.google.android.engage.service.ENV"
        android:value="PRODUCTION">
    </meta-data>
    
  3. Trước khi gửi APK cho Google, hãy đặt môi trường dịch vụ tương tác thành môi trường sản xuất trong tệp AndroidManifest.xml. Để đạt hiệu suất tối ưu và khả năng tương thích trong tương lai, bạn chỉ nên xuất bản dữ liệu khi ứng dụng ở nền trước và người dùng đang tích cực tương tác với ứng dụng, chẳng hạn như khi khởi chạy ứng dụng, sau khi đăng nhập hoặc trong quá trình sử dụng. Không nên xuất bản từ các quy trình nền.

  4. Xuất bản thông tin về lượt đăng ký đối với các sự kiện sau:

    1. Người dùng đăng nhập vào ứng dụng của bạn.
    2. Người dùng chuyển đổi giữa các hồ sơ (nếu được hỗ trợ).
    3. Người dùng mua một gói thuê bao mới.
    4. Người dùng nâng cấp một gói thuê bao hiện có.
    5. Gói thuê bao của người dùng hết hạn.

Tích hợp

Phần này cung cấp các đoạn mã ví dụ và hướng dẫn cần thiết để triển khai AccountProfileSubscriptionEntity nhằm quản lý nhiều loại gói thuê bao.

Tài khoản và hồ sơ người dùng

Để cho phép các tính năng cá nhân hoá trên Google TV, hãy cung cấp thông tin tài khoản. Sử dụng AccountProfile để cung cấp:

  1. Mã tài khoản: Giá trị nhận dạng riêng biệt đại diện cho tài khoản của người dùng. Đây có thể là mã tài khoản thực tế hoặc một phiên bản được làm rối một cách thích hợp.
// Set the account ID to which the subscription applies.
// Don't set the profile ID because subscription applies to account level.
val accountProfile = AccountProfile.Builder()
  .setAccountId("user_account_id")
  .setProfileId("user_profile id")
  .build();

Gói thuê bao chung

Đối với người dùng có gói thuê bao cơ bản cho các dịch vụ của nhà cung cấp nội dung nghe nhìn, chẳng hạn như một dịch vụ có một cấp thuê bao cấp quyền truy cập vào tất cả nội dung có tính phí, hãy cung cấp những thông tin thiết yếu sau:

  1. Loại gói thuê bao: Nêu rõ gói thuê bao cụ thể mà người dùng đã mua.

    1. SUBSCRIPTION_TYPE_ACTIVE: Người dùng đang có một gói thuê bao có tính phí còn hiệu lực.
    2. SUBSCRIPTION_TYPE_ACTIVE_TRIAL: Người dùng có gói thuê bao dùng thử.
    3. SUBSCRIPTION_TYPE_INACTIVE: Người dùng có tài khoản nhưng không có gói thuê bao hoặc gói dùng thử đang hoạt động.
  2. Thời gian hết hạn: Thời gian không bắt buộc tính bằng mili giây. Nêu rõ thời điểm gói thuê bao hết hạn.

  3. Tên gói của nhà cung cấp: Chỉ định tên gói của ứng dụng xử lý gói thuê bao.

Ví dụ về nguồn cấp dữ liệu mẫu của nhà cung cấp nội dung nghe nhìn.

"actionAccessibilityRequirement": [
  {
    "@type": "ActionAccessSpecification",
    "category": "subscription",
    "availabilityStarts": "2022-06-01T07:00:00Z",
    "availabilityEnds": "2026-05-31T07:00:00Z",
    "requiresSubscription": {
    "@type": "MediaSubscription",
    // Don't match this string,
    // ID is only used to for reconciliation purpose
    "@id": "https://www.example.com/971bfc78-d13a-4419",
    // Don't match this, as name is only used for displaying purpose
    "name": "Basic common name",
    "commonTier": true
  }

Ví dụ sau đây tạo một SubscriptionEntity cho người dùng:

val subscription = SubscriptionEntity
  .Builder()
  setSubscriptionType(
    SubscriptionType.SUBSCRIPTION_TYPE_ACTIVE
  )
  .setProviderPackageName("com.google.android.example")
  // Optional
  // December 30, 2025 12:00:00AM in milliseconds since epoch
  .setExpirationTimeMillis(1767052800000)
  .build();

Gói thuê bao Premium

Nếu ứng dụng cung cấp các gói thuê bao cao cấp nhiều cấp, bao gồm nội dung hoặc tính năng mở rộng ngoài cấp thông thường, hãy thể hiện điều này bằng cách thêm một hoặc nhiều quyền vào gói thuê bao.

Quyền này có các trường sau:

  1. Giá trị nhận dạng: Chuỗi giá trị nhận dạng bắt buộc cho quyền này. Giá trị này phải khớp với một trong các giá trị nhận dạng quyền (xin lưu ý rằng đây không phải là trường mã nhận dạng) có trong nguồn cấp dữ liệu của nhà cung cấp nội dung nghe nhìn được xuất bản trên Google TV.
  2. Tên: Đây là thông tin phụ và được dùng để so khớp quyền. Mặc dù không bắt buộc, nhưng việc cung cấp tên quyền dễ đọc sẽ giúp cả nhà phát triển và nhóm hỗ trợ hiểu rõ hơn về quyền của người dùng. Ví dụ: Sling Orange.
  3. Expiration TimeMillis: Bạn có thể chỉ định thời gian hết hạn (theo mili giây) cho quyền này (nếu khác với thời gian hết hạn của gói thuê bao). Theo mặc định, quyền này sẽ hết hạn khi gói thuê bao hết hạn.

Đối với đoạn mã nguồn cấp dữ liệu mẫu sau đây của nhà cung cấp nội dung nghe nhìn:

"actionAccessibilityRequirement": [
  {
    "@type": "ActionAccessSpecification",
    "category": "subscription",
    "availabilityStarts": "2022-06-01T07:00:00Z",
    "availabilityEnds": "2026-05-31T07:00:00Z",
    "requiresSubscription": {
    "@type": "MediaSubscription",
    // Don't match this string,
    // ID is only used to for reconciliation purpose
    "@id": "https://www.example.com/971bfc78-d13a-4419",

    // Don't match this, as name is only used for displaying purpose
    "name": "Example entitlement name",
    "commonTier": false,
    // match this identifier in your API. This is the crucial
    // entitlement identifier used for recommendation purpose.
    "identifier": "example.com:entitlementString1"
  }

Ví dụ sau đây sẽ tạo một SubscriptionEntity cho người dùng đã đăng ký:

// Subscription with entitlements.
// The entitlement expires at the same time as its subscription.
val subscription = SubscriptionEntity
  .Builder()
  .setSubscriptionType(
    SubscriptionType.SUBSCRIPTION_TYPE_ACTIVE
  )
  .setProviderPackageName("com.google.android.example")
  // Optional
  // December 30, 2025 12:00:00AM in milliseconds
  .setExpirationTimeMillis(1767052800000)
  .addEntitlement(
    SubscriptionEntitlement.Builder()
    // matches with the identifier in media provider feed
    .setEntitlementId("example.com:entitlementString1")
    .setDisplayName("entitlement name1")
    .build()
  )
  .build();
// Subscription with entitlements
// The entitement has different expiration time from its subscription
val subscription = SubscriptionEntity
  .Builder()
  .setSubscriptionType(
    SubscriptionType.SUBSCRIPTION_TYPE_ACTIVE
  )
  .setProviderPackageName("com.google.android.example")
  // Optional
  // December 30, 2025 12:00:00AM in milliseconds
  .setExpirationTimeMillis(1767052800000)
  .addEntitlement(
    SubscriptionEntitlement.Builder()
    .setEntitlementId("example.com:entitlementString1")
    .setDisplayName("entitlement name1")
    // You may set the expiration time for entitlement
    // December 15, 2025 10:00:00 AM in milliseconds
    .setExpirationTimeMillis(1765792800000)
    .build())
  .build();

Gói thuê bao cho dịch vụ được liên kết

Mặc dù gói thuê bao thường thuộc về nhà cung cấp nội dung đa phương tiện của ứng dụng gốc, nhưng bạn có thể chỉ định tên gói dịch vụ được liên kết trong gói thuê bao để phân bổ gói thuê bao cho một gói dịch vụ được liên kết.

Mẫu mã sau đây minh hoạ cách tạo gói thuê bao của người dùng.

// Subscription for linked service package
val subscription = SubscriptionEntity
  .Builder()
  .setSubscriptionType(
    SubscriptionType.SUBSCRIPTION_TYPE_ACTIVE
  )
  .setProviderPackageName("com.google.android.example")
  // Optional
  // December 30, 2025 12:00:00AM in milliseconds since epoch
  .setExpirationTimeMillis(1767052800000)
  .build();

Ngoài ra, nếu người dùng có một gói thuê bao khác cho dịch vụ phụ, hãy thêm một gói thuê bao khác và đặt tên gói dịch vụ được liên kết cho phù hợp.

// Subscription for linked service package
val linkedSubscription = Subscription
  .Builder()
  .setSubscriptionType(
    SubscriptionType.SUBSCRIPTION_TYPE_ACTIVE
  )
  .setProviderPackageName("linked service package name")
  // Optional
  // December 30, 2025 12:00:00AM in milliseconds since epoch
  .setExpirationTimeMillis(1767052800000)
  .addBundledSubscription(
    BundledSubscription.Builder()
      .setBundledSubscriptionProviderPackageName(
        "bundled-subscription-package-name"
      )
      .setSubscriptionType(SubscriptionType.SUBSCRIPTION_TYPE_ACTIVE)
      .setExpirationTimeMillis(111)
      .addEntitlement(
        SubscriptionEntitlement.Builder()
        .setExpirationTimeMillis(111)
        .setDisplayName("Silver subscription")
        .setEntitlementId("subscription.tier.platinum")
        .build()
      )
      .build()
  )
    .build();

Bạn cũng có thể thêm quyền sử dụng cho gói thuê bao của dịch vụ được liên kết (không bắt buộc).

Cung cấp bộ thuê bao

Chạy tác vụ xuất bản nội dung trong khi ứng dụng đang chạy ở nền trước.

Sử dụng phương thức publishSubscriptionCluster() của lớp AppEngagePublishClient để xuất bản một đối tượng SubscriptionCluster.

Sử dụng isServiceAvailable để kiểm tra xem dịch vụ có thể tích hợp hay không.

client.publishSubscription(
  PublishSubscriptionRequest.Builder()
    .setAccountProfile(accountProfile)
    .setSubscription(subscription)
    .build();
  )

Sử dụng setSubscription() để xác minh rằng người dùng chỉ có một gói thuê bao cho dịch vụ.

Sử dụng addLinkedSubscription() hoặc addLinkedSubscriptions() (chấp nhận danh sách các gói thuê bao được liên kết) để cho phép người dùng có từ 0 gói thuê bao được liên kết trở lên.

Khi dịch vụ nhận được yêu cầu, một mục mới sẽ được tạo và mục cũ sẽ tự động bị xoá sau 60 ngày. Hệ thống luôn sử dụng mục nhập mới nhất. Trong trường hợp xảy ra lỗi, toàn bộ yêu cầu sẽ bị từ chối và trạng thái hiện tại sẽ được duy trì.

Luôn cập nhật gói thuê bao

  1. Để cung cấp thông tin cập nhật ngay lập tức khi có thay đổi, hãy gọi publishSubscriptionCluster() bất cứ khi nào trạng thái gói thuê bao của người dùng thay đổi, chẳng hạn như kích hoạt, huỷ kích hoạt, nâng cấp, hạ cấp.
  2. Để xác thực thường xuyên nhằm đảm bảo độ chính xác liên tục, hãy gọi publishSubscriptionCluster() ít nhất một lần mỗi tháng.

  3. Để xoá dữ liệu Khám phá video, hãy xoá dữ liệu của người dùng theo cách thủ công khỏi máy chủ Google TV trước thời hạn lưu giữ tiêu chuẩn là 60 ngày bằng phương thức client.deleteClusters(). Thao tác này sẽ xoá tất cả dữ liệu hiện có về video khám phá cho hồ sơ tài khoản hoặc cho toàn bộ tài khoản, tuỳ thuộc vào DeleteReason đã cho.

    Đoạn mã để xoá gói thuê bao của người dùng

      // If the user logs out from your media app, you must make the following call
      // to remove subscription and other video discovery data from the current
      // google TV device.
      client.deleteClusters(
        new DeleteClustersRequest.Builder()
          .setAccountProfile(
            AccountProfile
              .Builder()
              .setAccountId()
              .setProfileId()
              .build()
          )
        .setReason(DeleteReason.DELETE_REASON_USER_LOG_OUT)
        .build()
        )
      ```
    Following code snippet demonstrates removal of user subscription
    when user revokes the consent.
    
    ```Kotlin
      // If the user revokes the consent to share across device, make the call
      // to remove subscription and other video discovery data from all google
      // TV devices.
      client.deleteClusters(
        new DeleteClustersRequest.Builder()
          .setAccountProfile(
            AccountProfile
            .Builder()
            .setAccountId()
            .setProfileId()
            .build()
          )
          .setReason(DeleteReason.DELETE_REASON_LOSS_OF_CONSENT)
          .build()
      )
      ```
    
    Following code demonstrates how to remove subscription data on user profile
    deletion.
    
    ```Kotlin
    // If the user delete a specific profile, you must make the following call
    // to remove subscription data and other video discovery data.
    client.deleteClusters(
      new DeleteClustersRequest.Builder()
      .setAccountProfile(
        AccountProfile
        .Builder()
        .setAccountId()
        .setProfileId()
        .build()
      )
      .setReason(DeleteReason.DELETE_REASON_ACCOUNT_PROFILE_DELETION)
      .build()
    )
    

Thử nghiệm

Phần này cung cấp hướng dẫn từng bước để kiểm thử việc triển khai gói thuê bao. Xác minh độ chính xác của dữ liệu và chức năng phù hợp trước khi ra mắt.

Xuất bản danh sách kiểm tra tích hợp

  1. Bạn nên xuất bản khi ứng dụng ở nền trước và người dùng đang tích cực tương tác với ứng dụng.

  2. Xuất bản khi:

    • Người dùng đăng nhập lần đầu tiên.
    • Người dùng thay đổi hồ sơ (nếu được hỗ trợ).
    • Người dùng mua gói thuê bao mới.
    • Người dùng nâng cấp gói thuê bao.
    • Gói thuê bao của người dùng hết hạn.
  3. Kiểm tra xem ứng dụng có đang gọi đúng API isServiceAvailable()publishClusters() trong logcat hay không, khi xuất bản các sự kiện.

  4. Xác minh rằng dữ liệu hiển thị trong ứng dụng xác minh. Ứng dụng xác minh sẽ hiển thị gói thuê bao dưới dạng một hàng riêng biệt. Khi API xuất bản được gọi, dữ liệu sẽ xuất hiện trong ứng dụng xác minh.

    • Xác minh rằng Cờ dịch vụ tương tác KHÔNG được đặt thành phiên bản phát hành trong tệp kê khai Android của ứng dụng.
    • Cài đặt và mở ứng dụng Engage Verification.
    • Nếu giá trị của isServiceAvailablefalse trong ứng dụng xác minh, hãy nhấp vào nút Toggle trong ứng dụng xác minh để đặt giá trị này thành true.
    • Nhập tên gói của ứng dụng. Hệ thống sẽ tự động cho thấy dữ liệu đã xuất bản.
  5. Chuyển đến ứng dụng rồi thực hiện từng thao tác sau:

    • Đăng nhập.
    • chuyển đổi giữa các hồ sơ (nếu được hỗ trợ).
    • Mua gói thuê bao mới.
    • Nâng cấp gói thuê bao hiện có.
    • Hết hạn gói thuê bao.

Xác minh quá trình tích hợp

Để kiểm thử quá trình tích hợp, hãy dùng ứng dụng xác minh.

Ứng dụng xác minh là một ứng dụng Android mà nhà phát triển có thể dùng để xác minh rằng SDK tích hợp đang hoạt động. Ứng dụng này có những chức năng giúp nhà phát triển xác minh dữ liệu và ý định truyền tin. Điều này giúp xác minh độ chính xác của dữ liệu và chức năng phù hợp trước khi ra mắt.

  1. Đối với mỗi sự kiện, hãy kiểm tra xem ứng dụng đã gọi API publishSubscription hay chưa. Xác minh dữ liệu đã xuất bản trong ứng dụng xác minh. Xác minh rằng mọi thứ đều có màu xanh lục trong ứng dụng xác minh
  2. Nếu tất cả thông tin của thực thể đều chính xác, thì hệ thống sẽ hiển thị dấu kiểm màu xanh lục "Tất cả đều ổn" trong tất cả các thực thể.

    Ảnh chụp màn hình ứng dụng xác minh thành công
    Hình 1. Đăng ký thành công
  3. Các vấn đề cũng được làm nổi bật trong ứng dụng xác minh

    Ảnh chụp màn hình lỗi ứng dụng xác minh
    Hình 2.Đăng ký không thành công
  4. Để xem các vấn đề trong gói thuê bao kết hợp, hãy dùng điều khiển từ xa của TV để chuyển tiêu điểm đến gói thuê bao kết hợp cụ thể đó rồi nhấp để xem các vấn đề. Trước tiên, bạn có thể phải tập trung vào hàng rồi di chuyển sang phải để tìm thẻ Gói thuê bao. Các vấn đề được đánh dấu màu đỏ như trong Hình 3. Ngoài ra, hãy dùng điều khiển từ xa để di chuyển xuống dưới và xem các vấn đề về quyền trong gói thuê bao

    Ảnh chụp màn hình thông tin chi tiết về lỗi ứng dụng xác minh
    Hình 3.Lỗi về gói thuê bao
  5. Để xem các vấn đề trong quyền, hãy dùng điều khiển từ xa của TV để tập trung vào quyền cụ thể đó rồi nhấp để xem các vấn đề. Các vấn đề được đánh dấu màu đỏ.

    Ảnh chụp màn hình lỗi ứng dụng xác minh
    Hình 4.Thông tin chi tiết về lỗi gói thuê bao

Tải xuống

Trước khi tải xuống, bạn phải đồng ý với các điều khoản và điều kiện sau.

Ðiều khoản và điều kiện

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
Tải

verify_app_multiplatform_public_20250602.apk