kiwix-android/README.md
2023-05-09 07:47:51 +02:00

6.5 KiB
Raw Blame History

Get it on Google Play Get it on F-Droid

Kiwix Android

Kiwix is an offline reader for Web content. One of its main purposes is to make Wikipedia available offline. This is done by reading the content of a file in the ZIM format, a highly compressed open format with additional metadata. This is the version for Android.

Kiwix Android is written in Kotlin

Build Status Nightly codecov CodeFactor License: GPL v3 Public Chat Slack

Build Instructions

Production releases of the app are built on travis and released automatically

To build this repository alone for development purposes you can simply import the project into Android Studio and the hard work will be done for you. Note here that instead of opening the project, you have to import it. If you prefer to build without Android Studio you must first set up the Android SDK and then run the command: ./gradlew build from the root directory of the project.

Kiwix-Android is a multi-module project, in 99% of scenarios you will want to build the app module in the debug configuration. If you are interested in our custom apps they have their own repo kiwix-android-custom that goes into further detail

Libraries Used

  • Dagger 2 - A fast dependency injector for Android and Java
  • Retrofit - Retrofit turns your REST API into a Java interface
  • OkHttp - An HTTP+SPDY client for Android and Java applications
  • Butterknife - View "injection" library for Android
  • Mockito - Most popular Mocking framework for unit tests written in Java
  • RxJava - Reactive Extensions for the JVM a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
  • ObjectBox - Reactive NoSQL Databse
  • MockK - Kotlin mocking library that allows mocking of final classes by default.
  • JUnit5 - The next generation of JUnit
  • AssertJ - Fluent assertions for test code
  • Fetch - A customizable file download manager library for Android

Contributing

Before contributing be sure to check out the CONTRIBUTION guidelines.

We currently have a series of automated Unit and Integration tests. These can be run locally and are also run when submitting a pull request.

Code Style

For contributions please read the CODESTYLE carefully. Pull requests that do not match the style will be rejected.

Commit Style

For writing commit messages please read the COMMITSTYLE carefully. Kindly adhere to the guidelines. Pull requests not matching the style will be rejected.

Localization

Kiwix Android is available in multiple languages and managed by Translatewiki. When adding new string resources, contributors are required to provide additional context on how and where the new string will be used. This helps translators to understand the context and translate accurately.

String resources

All user visible strings in an Android application should be listed in strings.xml files to allow for easy translation, replacement and modification. Newly added string resources are imported by translatewiki and are then manually translated. After translations are complete the translations are merged with Kiwix Android.

How do I add a new string resource?

Start by adding your new string resource new_string to values/strings.xml in English. That is:

...
<string name="new_string">New String</string>
...

You will now have to describe the string in values-qq/strings.xml with where and how the new string is used. E.x. for the string <string name="on">On</string>:

values-qq/strings.xml:

...
<string name="on">This is used in the settings screen to turn on the night mode.</string>
...
  • The values in values/strings.xml are the strings that are going to be displayed in the Kiwix application to the user.
  • The values in values-qq/strings.xml are only visible to the translator and are only there to help them make a correct translation.

Communication

Available communication channels:

For more information, please refer to https://wiki.kiwix.org/wiki/Communication.

License

GPLv3 or later, see COPYING for more details.