Hello. I am zm soft, I registered as a developer last year (end of ’23) and started releasing apps. we are also planning to release a tester application for developers to clear PlayStore’s closed test, if you want to check it out.
OSS information that is often overlooked
Do you write OSS information when you create an app? When developing apps, many developers pay attention to privacy policy statements, but tend to overlook information about open source software (OSS). However, OSS license information may be legally required to be displayed, depending on the OSS being used.
In particular, most developers pay attention to this part of the privacy policy, as it is often pointed out in Google Play audits. On the other hand, OSS license information is rarely pointed out in similar audits, so there are many developers who do not comply with it. In fact, when I use applications as a tester, I see many applications without OSS information.
Difficulty in complying with OSS indication
When I was making my apps OSS compliant, I set up a text view in the app and displayed the OSS information along with the privacy policy there. By placing text files for each OSS in a specific folder, I was able to automatically display this information in the view. The actual implementation is as follows: just place the text files in the assets/oss folder and read them out. Then simply display it in the appropriate View and you are done.
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
}
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
}
However, as development progressed, this method of maintenance became more and more difficult: OSS additions tended to be put off until later, and when developing multiple applications, it was easy to forget to update OSS information. In the end, we are no longer able to maintain it as it is.
The savior of OSS support
We want to leave the hassle to someone else. So we used a library to display it. So far it seems to be fine, and it has made things so much easier. I honestly wish I had used it earlier. I used a library called AboutLibraries.
It is very easy to use. The implementation part is almost only the following parts.
val fragment = LibsBuilder()
.supportFragment()
val transaction = activity.supportFragmentManager.beginTransaction()
transaction.add(R.id.libsFragment, fragment)
transaction.commit()
Since it is completed in Fragment, OSS support is almost complete by simply setting up an appropriate location and displaying it.
Good-looking design for easy handling
The screen image when actually displayed looks like this.
It looked very much like that for a quick creation. The content was also fine (of course, you have to be careful because it shouldn’t be universal). It is very good.
A little more detail on how to actually use it.
Of course, there are a few more things that actually need to be done, so I’ll describe them here. We will modify the build.gradle file, adding an aboutlibraries specification to plugins and dependencies. Specify the version as appropriate.
plugins {
id ("com.mikepenz.aboutlibraries.plugin")
}
dependencies {
implementation ("com.mikepenz:aboutlibraries:10.10.0")
}
Other Libraries
Although I did not use them, there seemed to be many other libraries for OSS license indication as well. The following is a list of some of the most well-known ones.
- OSS Licenses Plugin
A Gradle plugin provided by Google that automatically collects license information for open source libraries used during the app build process and generates an activity to display them. This is especially useful if you make heavy use of Google’s libraries. - LicenseAdapter
A simple Adapter to list and display license information for open source libraries. With this library, license information can be integrated into a custom UI. - LicensesDialog
A simple library for creating dialogs to display license information for open source libraries in your apps.
All of them seem to be well received and easy to use themselves. Use the one that best suits your application and proceed with app development with peace of mind.
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
Your article helped me a lot, is there any more related content? Thanks!
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Your article helped me a lot, is there any more related content? Thanks!