Hello! I'm zm soft, a developer who registered in late 2023 and started publishing apps. I'm also planning to release a tester recruitment app for developers to help clear Google Play's closed testing requirement — feel free to check it out.
The OSS Information Developers Often Miss
Are you including OSS information in your apps? When building apps, most developers pay careful attention to their privacy policy, but open source software (OSS) license information often gets overlooked. Depending on which OSS libraries you use, displaying that information may actually be a legal requirement.
Privacy policies tend to get flagged during Google Play audits, so most developers stay on top of that. OSS license information, on the other hand, rarely gets flagged — which means a lot of developers aren't compliant. I've personally used many apps as a tester and seen how often OSS information is simply missing.
Why OSS Compliance Is Tricky
When I first added OSS compliance to my own apps, I created a dedicated text view inside the app and displayed the OSS information alongside the privacy policy. I placed a text file for each OSS library in a specific folder and set it up to automatically load and display those files. Here's what the implementation looked like — just read files from the _assets/oss_ folder and display them in a view:
fun readLicenseTexts(): Map<String,String>{
var map : MutableMap <String,String> = mutableMapOf()
val fileList = assetManager.list("oss")
if (fileList != null) {
for (file in fileList) {
map.put(file.replace(".txt",""), readTextAssets("oss/$file"))
}
}
return map
}
As development progressed, though, maintaining this became a real chore. It was easy to put off adding new OSS entries, and when working on multiple apps, I'd sometimes forget to update the OSS information entirely.
The Easy Solution
When something's tedious, delegate it. I switched to using a library to handle the display, and it's worked great ever since. Honestly, I wish I'd done it sooner. The library I used is AboutLibraries.
It's incredibly simple to use. The implementation is essentially just this:
val fragment = LibsBuilder()
.supportFragment()
val transaction = activity.supportFragmentManager.beginTransaction()
transaction.add(R.id.libsFragment, fragment)
transaction.commit()
Since it's Fragment-based, you just find a place to slot it in and display it — OSS compliance is basically done.
Looks Great for How Little Work It Takes
Here's what the screen looks like in practice:
Considering how quickly it came together, the result looks really polished. The content is accurate too. Highly recommended.
A Bit More Detail on Setup
There is a little more to it in practice — mainly adding the library to your build files. Update build.gradle to add aboutlibraries to both the plugins and dependencies sections. Adjust the version number as needed.
plugins {
id ("com.mikepenz.aboutlibraries.plugin")
}
dependencies {
implementation ("com.mikepenz:aboutlibraries:10.10.0")
}
Other Libraries
I haven't used these personally, but there are several other libraries for displaying OSS license information. Here are some well-known options:
- OSS Licenses Plugin — A Gradle plugin from Google that automatically collects license information for OSS libraries used in your app during the build process and generates an activity to display them.
- LicenseAdapter — A simple adapter for displaying OSS license information in a list view.
- LicensesDialog — A library for easily creating a dialog that displays OSS license information inside your app.
All of them seem well-regarded and easy to use. Pick the one that fits your needs and ship your app with confidence.