oppia-android
oppia-android copied to clipboard
Ensure entire license text is displayed for all the copyright licenses
Reference Link - https://stackoverflow.com/a/51733275/12215015
We cannot have a string that is larger than 32,767 bytes (encoded in UTF-8) in your APK file but some license texts (like CDDL + GPLv2
license) that are generated by running the RetrieveLicenseTexts.kt
script are larger than 32,767 bytes so they can not be displayed directly in the UI and we only show the license link in these cases.
We should display the license texts whenever possible and hence we need another solution to support displaying large license texts.
Potential solutions
-
Rather than storing the license texts in the third_party_dependencies.xml file, we can store them in a textproto file and parse the textproto file to display the license texts.
-
Rather than storing the license text in a single string, we can split the license text before the first whitespace character before the
max_limit_of_chars
store the text in an array of strings. We can then concatenate all the strings of the array while displaying the license texts in the UI.
To clarify point (1), we'd need to load texts into a .pb file and load that from the app's assets directory. That could work as a drop-in replacement for using string resources in a way that avoids the limit, though we'd need some additional piping through the domain layer.
If this issue still open, Shall i work on it ?
If this issue still open, Shall i work on it ?
Hi, Please submit an overview of your proposed solution. You can also create a draft PR for this.