Safeguard
Developer Tools•

How do you add an open source licenses screen to an Android app?

Use Google's oss-licenses Gradle plugin and the play-services-oss-licenses library to collect notices and show them in an activity. Steps and limits.

Safeguard Security Team
4 min read

Add Google's oss-licenses Gradle plugin, apply it in your app level build file, add the play-services-oss-licenses dependency, and launch OssLicensesMenuActivity. The tools collect license terms declared in your libraries' POM files and display them as a list. You still own checking that the result is complete.

Definition

Google's developer guide says that as a developer you are responsible for displaying the open source library notices your app uses, including for libraries that Google Play services SDKs include or depend on. To help, Google Play services provides the oss-licenses-plugin and the play-services-oss-licenses SDK, which collect license terms and create an activity that displays them.

Steps

Follow the current Google guide for exact versions and syntax. The flow is:

  1. Add the oss-licenses Gradle plugin in your project settings, in the plugin management section.
  2. Apply the plugin in your app level build file.
  3. Add the play-services-oss-licenses library as a dependency.
  4. Launch OssLicensesMenuActivity from a menu item, such as Settings and then Open source licenses.
  5. Optionally set a title and apply a theme to the licenses activity.
  6. Build, open the screen on a test device, and confirm entries appear.

What the plugin can and cannot know

The guide says the tool collects license terms as declared in libraries' POM files. That has consequences.

SituationEffect
Library declares its license in its POMLikely listed
Library omits or mislabels the license fieldMissing or wrong entry
Vendored source copied into your repoNot a declared dependency, so not collected
Fonts, icons, images, sounds you bundledNot covered; add them by hand
Native libraries bundled outside GradleNot covered; add them by hand

So treat the generated screen as a base, then compare it with a separate inventory of what actually ships.

Do the screen and the license text match?

Some licenses ask for more than a name. MIT asks that the copyright and permission notice be included in copies. Apache 2.0 asks that a copy of the license accompany the Work and that NOTICE contents be reproduced in a place such as documentation or a display. The generated list helps when it contains the full texts, so open a few entries and read them.

Release checklist

  1. Update dependencies, then rebuild the licenses screen.
  2. Compare the screen to your SBOM and note differences.
  3. Add manual entries for assets and native code.
  4. Check that the screen is reachable without logging in.
  5. Keep the SBOM for the release with your records.

Try it yourself

Click through the inventory demo below and compare the component list with what you would expect on your licenses screen. Look for components that a POM based tool would miss.

Click through it at your own pace, or open it full screen.

Safeguard's SBOM and dependency scanning produce the inventory to compare against, and an Android build is among the surfaces on the download page. A free scan is available at gold.safeguard.sh/scan.

Quick check

Does Google Play require this screen?

Google's guide says developers are responsible for displaying the notices that library licenses require. The plugin is a tool to help do that.

Does the plugin catch everything in my app?

No. It collects terms declared in POM files, so assets and code outside Gradle dependencies need manual entries.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.