Wikimedia

Kiwix mobile app on Android: Move at least 30 constants to separate package

Kiwix is an offline reader for Web content. One of its main purposes is to make Wikipedia available offline. Read https://github.com/kiwix/kiwix-android/wiki/Google-Code-in to learn how to contribute.

We have a lot of constants: log tags, preference keys, activity result keys and whatnot. In some places these constants are hardcoded.

Remove at least 30 hard coded strings and replace them with a constant Group constants that are of the same kind (all Preference Keys for example) and move them to a separate class (create a new package called constants for that). For example:

zimFile = getIntent().getStringExtra("zim_file");

Replace the hardcoded "zim_file" with a constant. Some already have a constant, and some are duplicated throughout multiple files.

Task tags

  • kiwix
  • android
  • java

Students who completed this task

Albert Wolszon

Task type

  • code Code
close

2017