Skip to content

v2 (com.google.android.gms.oss.licenses.v2): setActivityTitle() is not available, but documentation doesn't cover v2 API #364

@appachan

Description

@appachan

Describe the bug

The official guide (Include open source notices) documents OssLicensesMenuActivity.setActivityTitle() as the way to customize the activity title. However, play-services-oss-licenses:17.4.0 introduced a new v2 Activity (com.google.android.gms.oss.licenses.v2.OssLicensesMenuActivity) that does not have this static method. The guide has not been updated to reflect the v2 API.

The workaround is to pass the title via Intent.putExtra("title", ...). This is not documented anywhere in the official guide.

To Reproduce

  1. Upgrade to play-services-oss-licenses:17.4.0 and use com.google.android.gms.oss.licenses.v2.OssLicensesMenuActivity.
  2. Call OssLicensesMenuActivity.setActivityTitle(...) as described in the official guide.
  3. Build fails: Unresolved reference: setActivityTitle.

Expected behavior

com.google.android.gms.oss.licenses.v2.OssLicensesMenuActivity provides setActivityTitle() as documented in the official guide.

Screenshots

Image

Desktop (please complete the following information):

  • Gradle version: 8.13
  • Android Studio version: Otter 2 Feature Drop | 2025.2.2
  • Plugin name and version: oss-licenses-plugin 0.10.10
  • Library dependency: play-services-oss-licenses 17.4.0

Additional context

  • The v2 API reference (OssLicensesMenuActivity – v2) also appears to include setActivityTitle().
  • Figure 1 in the official guide ("The licenses menu activity shows a selectable list of open source libraries that an app uses.") appears to show the old v1 UI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions