oppia-android icon indicating copy to clipboard operation
oppia-android copied to clipboard

Ensure entire license text is displayed for all the copyright licenses

Open prayutsu opened this issue 3 years ago • 3 comments

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

  1. 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.

  2. 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.

prayutsu avatar Aug 26 '21 06:08 prayutsu

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.

BenHenning avatar Oct 22 '22 10:10 BenHenning

If this issue still open, Shall i work on it ?

dmdbilal avatar Jan 06 '24 10:01 dmdbilal

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.

adhiamboperes avatar Jan 30 '24 06:01 adhiamboperes