GithubHelp home page GithubHelp logo

kiwix / kiwix-android Goto Github PK

View Code? Open in Web Editor NEW
825.0 31.0 443.0 323.66 MB

Kiwix for Android

Home Page: https://android.kiwix.org

License: GNU General Public License v3.0

JavaScript 0.07% Python 0.04% Shell 0.39% HTML 0.56% Kotlin 98.94%
kiwix offline wikipedia android kotlin zim

kiwix-android's Introduction

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 achieved 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, with support versions ranging from 7.1 to 13.

Important Note: Starting from Android 11, the ZIM file picker feature has been restricted in the Play Store variant due to Play Store policies. This means that users running Android 11 and above will not be able to load ZIM files from internal/external storage directly within the app if they have downloaded Kiwix from the Google Play Store. This restriction is in place to comply with the Play Store policies. The Play Store variant of Kiwix does not require the MANAGE_EXTERNAL_STORAGE permission anymore, which is necessary to scan storage and access ZIM files at arbitrary locations. Therefore, the storage scanning & file picking functionalities are not available in this variant anymore. To use the full version of Kiwix and benefit of the ZIM file picker feature, you can download it directly from the official repository or use F-Droid. We understand that this restriction may cause inconvenience, but it is necessary to comply with the Play Store policies and ensure a smooth user experience. We recommend using the official version of the app available on our website to access the complete set of features.

Kiwix Android is written in Kotlin

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

Build instructions

To build Kiwix Android, clone this repository and import (not open) the project with Android Studio.

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. The project requires Java 11 to run, Therefore set the Gradle JDK to Java 11.

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.

Libraries Used

  • Libkiwix - Kotlin/Java binding for the core Kiwix library
  • 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 Database
  • 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
  • ZXing - Barcode scanning library for Java, Android

Contributing

Before contributing be sure to check out the CONTRIBUTION guidelines.

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

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.

kiwix-android's People

Contributors

0xsiddharthks avatar 4shutosh avatar abdulwd avatar aditya-sood avatar akkywadhwa avatar bbt-seanmacgillicuddy avatar borisfba avatar cdhiraj40 avatar cip avatar eladkishon avatar frans-lukas avatar gouri-panda avatar iadeelzafar avatar jhbiggs avatar julianharty avatar kelson42 avatar macgills avatar mhutti1 avatar mohamed-sameh-khalil avatar mohitmalideveloper avatar rashiq avatar rgaudin avatar ritvikmahajan17 avatar rutvik-panchal avatar s-ayush2903 avatar sagar0-0 avatar soloturn avatar sonusourav avatar translatewiki avatar yashk2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kiwix-android's Issues

Make three options to deactivate sidebars, tabs and reading

There should be a custom configuration option using our buildVariant system that can disable side bars and tabs independently. It should not be exposed to the user.

  • index side bar
  • tabs side bar (probably deactivate tabs)
  • read aloud

This is necessary for the Phet app

Improve "Hide toolbar when scrolling"

I'm one of kiwix and Wikipedia readers, I'd love to be one of the the participants of the Wikipedia kiwix design team, and would like you to add this advantage of 'pocket' app to the 'kiwix' app because I love this app and want it to be the best ever.

  • the advantage is when you scroll down ⬇ in the screen the app will automatically full screen so the reader will enjoy full screen reading easily without pressing on the full screen option.
    demo.mp4.zip

SD card seems not to be detected on ChromeBook

It's possible to run Android app on ChromeBook. Unfortunately, it seems that the SD card is not detected. Here a feedback of a user (James)

Under files I have "SD Card"
I have now put "wikipedia_en_all_2016-12.zim" on the card.
When I go to the SD card and click on that file Kiwix automatically opens but then says:
"Error. The selected zim cannot be found".
When I go to "storage" under settings within Kiwix all I get is "internal 20.2 GB".
I am however able to set the chromebook so it automatically downloads new files via google chrome to the SD card.

MVP pattern for the app?

From @rashiq on January 1, 2017 16:54

Hey!
So I've been wanting to do this for quite some time now, but I'm not sure, if I should do it.

I want to refactor the app to follow the MVP (Model View Presenter) design pattern, in order to structure the app better, to enforce separation of concern better and especially to separate business logic from view logic.

It takes some time to wrap your head around this pattern, but once you get it it's really awesome and will make our code so much better. We will finally get rid of our gigantic classes. This will also make it possible for us to start writing actual tests.
I've been refactoring our main activity for the past two weeks now, and this would be my next logical step.

Reading material: http://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/
Examples of implementations: http://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/, https://github.com/rashiq/bitcoin

(Look at how the activity in this example only has view logic: https://github.com/rashiq/bitcoin/blob/master/app/src/main/java/com/linechart/presentation/view/mainview/MainActivity.java
and all the business logic is in the presenter: https://github.com/rashiq/bitcoin/blob/master/app/src/main/java/com/linechart/presentation/view/mainview/MainViewPresenter.java)

Let me know what you think of this @kelson42 @mhutti1 @EladKeyshawn

Copied from original issue: kiwix/kiwix-xulrunner#420

Problem with WikiMed on Android 7.0

From the OTRS feedback queue:
"This app is very useful and thank you.
But I want to report a problem that it doesn't work on android 7.0
It worked correctly on android 6 but since I upgrade to android 7 it doesn't and get error: The selected file is not a valid ZIM file. and then show nothing but a white page.
I attached a screenshot of that error"
screenshot_20170206-024203

gen-custom-android-build.py should provide a solution to override info.json

From @kelson42 on December 30, 2016 20:17

gen-custom-android-build.py is the script used to create custom apps, ie. apps which include a unique content (ZIM file) and are rebranded.

The custom apps properties are stored in a json file like custom/wikimedpt/info.json for example. We need a solution to be able to call gen-custom-android-build.py with a info json file and overrides json files properties on the fly.

Here is how it should work:
./gen-custom-android-build.py custom/wikimedpt/info.json --override-version_code=42

should overwrite the "version_code" in the info.json file. This should work for all the possible values in the json file (--override-version_name, --override-enforced_lang, ...)

Copied from original issue: kiwix/kiwix-xulrunner#409

Invalid bookmark creation on Android

From @kelson42 on April 9, 2016 19:56

1 - Click many times on "random" and "bookmark" icons in the action bar (to create dozens of random bookmarks
2 - Open the bookmarks (long clikc on bookmark icon)
3 - Part of the bookmarks listed are listed as content://org.kiwix.zim.base/..... and trying to open these bookmark opens the welcome page of the current ZIM file

The problem probably happens if the HTML is not fully loaded at the time the bookmark icon is clicked. Then the title of the page is probably unknown (HTML not fully parsed).

IMO, if the page is not fully loaded the bookmarking code should be triggered one time the page is loaded (non blocking).

Copied from original issue: kiwix/kiwix-xulrunner#20

trouble with fulltext search on Android 5 while not on Android 4

Hello all! I am an extremely happy user of Kiwix on a relatively old tablet (samsung on Android 4), where everything ls perfect, among others I have the Wikipedia and the related index file, and fulltext search activated.
Recently I tried to install the same config on a phone with Android 5, and I find the zim files are found and used, but the .idx folder (that I locate at the same place as the .zim) is not found, or not used, apparently.
Where am I wrong? Is there a more specific location in the Android 5 file hierarchy, for instance?
This issue is the same I discussed on the #kiwix channel on the 24@21:40, but I don't need an instant answer, nor do I want to impose a new point in the bugtracker if I am just goofing on the folder location, for instance...
On the andro 4 machine where everything works, the zim files and .idx folder are in /android/content ; on the andro5 machine I did put them elsewhere, straight in /content (aside the /android folder) because initially without .idx files this just worked.
Is this my error?

On both machines I am using the last official kiwix straight from google apps; the zim for which I add the .idx folder is the latest french wikipedia, wikipedia_fr_all_2016-6.zim and the folder with same name plus .idx at the end…

Thank you!
Hervé

Custom apps should be moveable to the external SD card

From @kelson42 on November 29, 2016 11:33

Kiwix releases pretty big custom apps (~1GB). Google plays allows only to downlaod the app on the main memory. Android allows only to move the app (and not any companion files) to the external SD card.

This is a problem because most of the people do not have a lot of free space on the main storage or do not want to keep it there.

The solution is not clear to me, but IMO we should provide - at least - a feature to move the whole app (main APK + companion file) to the external SD card. Hope this is feasible at all!

Copied from original issue: kiwix/kiwix-xulrunner#374

Search problem - some results disappear as typing advances

From @Popolechien on January 17, 2017 9:30

(from OTRS - the example was with Wikipedia in Spanish but I guess it applies to other languages)
"If I type "fortaleza de san car" it shows me one result when there should be two:

  1. Fortaleza de San Carlos de la Cabaña.
  2. Fortaleza de San Carlos de Perote.
    It only shows Perote (the second one), when la Cabaña appears in the list if I were to type only "Fortaleza de". So basically the search console ignores the existence of an article it normally finds with less granularity.

See attached file as well"
WIKI.pptx

Copied from original issue: kiwix/kiwix-xulrunner#442

Allow cross-app search using share function

From @Popolechien on January 4, 2017 11:39

From the OTRS queue:
"It would be very helpful if users could longpress to highlight a word in another app (e.g. an eBook reader) and use the Share function to send the word to Kiwix for searching its meaning. Other apps are
already doing this... for example, the offline dictionary app English Dictionary - Offline by Livio (
https://play.google.com/store/apps/details?id=livio.pack.lang.en_US ) includes as one of its features:

"Compatible with Moon+ Reader, FBReader and other applications via share button"

Moon+ Reader and FBReader are the 2 most popular eBook Reader apps for Android with tens of millions of installs each."

Copied from original issue: kiwix/kiwix-xulrunner#427

[Bug] Android app: search is not always case insensitive [sf#943]

Reported by axel_boldt on 2016-02-24 00:56 UTC
I'm using Android Kiwix 1.96 on Android 4.4.4, with the complete German Wikipedia zim file.

I expect the search to be case insensitive, and for the most part it is: searching for "am adler" or "Am adler" or "am Adler" or "AM ADLER" or "aM aDler" will all find the article "Am Adler".

But if the article title has three or more words, and the second word is lower-case, then case-insensitive search does not work: searching for "frankfurt am main" or "Frankfurt Am Main" or "FRANKFURT AM MAIN" will not find the article named "Frankfurt am Main", yet searching for "frankfurt airport center" or "FRANKFURT AIRPORT CENTER" or "Frankfurt Airport center" or "fRankfurt aIrport cEnter" will all find the article named "Frankfurt Airport Center".

Also, case-insensitive search does not work right if the article starts with a lower-case letter: searching for "A posteriori" will find the article named "a posteriori", but searching for "A Posteriori" or "a Posteriori" or "A POSTERIORI" will not find it.

not durable when relocated to external drive

From @Thetoxicarcade on March 14, 2017 4:15

I tried moving kiwix to a removable drive.

Kiwix essentially bricks itself when trying to list repos afterwards.

It's possible I'm just stupid, but if we could explain this process better, that would make working with an external (portable) kiwix installation dir a much better process.

Maybe the answer is better explanations, maybe the solution is a "migrate" function (for library data, or for the entire .kiwix folder), maybe the solution is a heal-button that resets all the woes, instead of me redownloading a clean install instead of my bricked one.

Ideas?

Copied from original issue: kiwix/kiwix-xulrunner#473

Icon tooltip font color is wrong

From @kelson42 on February 11, 2017 19:6

by clicking on the icon a tooltip appears explaining the purpose of the button. the font is in black. Considering the background of the tooltip is black or grey (depending the android version) I think it would be better to make white (or grey light).

Copied from original issue: kiwix/kiwix-xulrunner#459

App appears corrupted when user is logged out

From the OTRS queue:
"The Wikivoyage Offline Travel Book app only starts when I'm logged in
as the user who first installed it. When logged in as another user,
the app displays the following error message when started:

"Wikivoyage"
"Your application is corrupted."
"This might happen when you remove files on the SD Card."
"You need to uninstall then reinstall the App from the Play Store."

The device is a Google Nexus 10 tablet running CyanogenMod 13 with
Android 6.0.1 and two user accounts. Please note that I haven't
removed anything from the SD card, the device doesn't even have one. I
have only installed the app from the Play Store for both users. Of
course, uninstalling and reinstalling the app from the Play Store as
suggested does not change anything to the problem.

In Settings > Apps > Wikivoyage, 713 MB of storage is reportedly used
by the app if logged in as the user who first installed it, while only
43.6 MB is reported if logged in as another user. So it looks like the
app has files that are only accessible to the first user.

Additional info: if the user who first installed the app is /not/ the
device's owner (the first user created at system installation), then
after trying to open the app as the device's owner, it becomes
"corrupted" for the first user too: the same error message appears and
storage usage drops from 713 MB to 43.6 MB. This behavior does not
happen, as far as I can tell, if the user who first installed the app
/is/ the device's owner: in this case the app remains functional for
him after trying to open it as another user."

Suggest similarly spelled search results

From @rashiq on June 8, 2016 13:6

Reported by rauldelacalle on 2015-03-09 01:16 UTC
SPANISH;

Buen día.

Descargue la aplicacion Kiwix para android y la instalé. Descargué el Wikcionario en español, lo descomprimí y lo cargue en la memoria externa del telefono inteligente. Desde la aplicación leo el archivo y todo está bien.

Pero cuando escribo una palabra de manera equivocada el Wikcionario no me corrige. Ejemplo: en español la forma correcta es: Zapato. Si escribo sapato la aplicación me dice: Error: "falló la carga del artículo sapato", pero no me corrige debería mostrame las opciones. Es decir que tengo que ser un experto en el idioma para buscar, no me sirve de esa manera pues el objetivo es que me corrija cuando yo estoy equivocado.

Si hago lo mismo en el computador me muestra como opciones:

  1. Zapato
  2. Calzado
  3. Pasta de zapatos
  • Es posible mejorar la aplicación para android?
  • Estoy fallando en algo?

ENGLISH:

Good day.

Download the Kiwix application for android and I installed it. I downloaded the Wiktionary in Spanish, unzipped it and upload it to the external memory of the smart phone. Since I read the application file and all is well.

But when I write the wrong word Wiktionary does not correct me. Example: in Spanish is written: ZAPATO. If SAPATO write the application tells me: Error: "failed load SAPATO article", but does not correct me should show me the options. You mean I have to be an expert in the language to find, does not help me that way because the objective is to correct me when I'm wrong.

If I do the same on the computer shows me as options:

  1. Zapato
  2. Calzado
  3. Pasta de zapatos
  • It is possible to improve the application for android?
  • I'm failing at something?

Copied from original issue: kiwix/kiwix-xulrunner#193

Implement a automod system for the Android custom app version_name

From @kelson42 on December 30, 2016 20:22

gen-custom-android-build.py is the script used to create custom apps, ie. apps which include a unique content (ZIM file) and are rebranded.

If version_name is empty, then script gen-custom-android-build.py should try to take it from the ZIM file content. It can do that because:

  • Custom apps versions are the date of the content, for example 2016-12
  • This date is in the file name of the ZIM content.

So if there is not version_name, then gen-custom-android-build.py should try to extract the date from the ZIM file name which ends with it: for example "wikipedia_en_medicine_2016-12.zim" will give "2016-12".

Copied from original issue: kiwix/kiwix-xulrunner#410

Give access to article in the history through Android Screen Search

From @kelson42 on December 31, 2016 12:30

To improve Kiwix integration in the Android ecoystem we should provide a way to access/search in Kiwix content through Android Screen Search.

Open article (so which are in the history) should be also be available through the Android Screen Search. Probably using the Persional Content Indexing https://firebase.google.com/docs/app-indexing/android/personal-content

These entries should be removed if the user clear the history.

Copied from original issue: kiwix/kiwix-xulrunner#417

Index not synced with article

Sometimes, especially with many open tabs open and after closing one or more of them, I noticed that the index is incorrect for at least one open article. It looks as if the index is somehow not updated about the closed tabs. So the array of article-names-in-open-tabs differs from the array of article-names-in-index.

tested with 2.1

17746_2 0_stale_menu_122_72lo

Improvement for blind people?

From @kelson42 on February 20, 2017 7:40

User feedback... I have no clue what is going here... why wikimed behaves differently like Kiwix?

I am a visually impaired user of the braille note touch, an android tablet by
Humanware which is designed for the visually impaired.
  I have been attempting to use the "kiwix" app, but I believe you use a "web
view" when the article is loaded. This is in contrast to another of your apps
called "medical wikipedia (offline)", which I can use fully and properly. In other
words, I can download any content in kiwix, but it's when an article is loaded
that I can't read it: a sighted person tells me that the article did indeed load,
but I can't access it. I just read a "web view". This does not happen in the app
"medical wikipedia", where I can access it fully. Could you please try and fix
this, perhaps by discovering the difference, if any, between the way articles are
presented in the different apps.
  Finally, I'd like to thank all the volunteers for the truly wonderful and
amazing work you do, both editing the articles and making them offline and, well,
everything!
  Thanks again for everything, look forward to response!

Copied from original issue: kiwix/kiwix-xulrunner#465

Add contact email address to help page

Just as a quick experiment to try and identify where users come from, let's add the address [email protected] at the bottom of the help page. Current text is
"Thank you for choosing Kiwix! We are glad to have you on board and would appreciate any feedback or suggestions"
change it to
"Thank you for choosing Kiwix! We are glad to have you on board and would appreciate any feedback or suggestions at [email protected]"

Bonus points if the subject line can indicate the default language/country the phone or app is set in, e.g. "Feedback in [language]" or "from [phone country code]" (I don't know if that is possible, just asking).

Add i18n check to Kiwix Android's compilation script

From @kelson42 on December 11, 2016 12:55

Your task is to implement a check to detect string literals in Kiwix app source code and - using this new feature - move the few detected string literals still in the code to the string resource file.

Steps to reproduce:

  • Compile Kiwix for Android

What you get:

  • Compilation run fine - even if string literals (hard coded strings not in our strings.xml file) are in the code.

What we want:

  • Compilation should die with an informative error.

What do to:

  • Change the compilation process to forbids string literals (non-externalized strings/NON-NLS) in the code.
  • Put all the strings which has to be localized (only user facing strings) in the strings.xml file (this gets tranlated by volunteers automatically)
  • Put a tag to skip detection (compilation error) on all strings which have to stay as literals in the code (i.e id codes).

Helpful resources:

Copied from original issue: kiwix/kiwix-xulrunner#385

Missing webview scrollbar

I've had the request on OTRS so I'm just asking: has the elevator bar been removed after the 2.2 release? Is it a bug or a feature?

Correctly handle icudt*.dat in android.

For now the icudt*.dat is loaded by the java code on android.

However, the kiwixlib has code to load the same data.
It is only used if we are on a apple platform (with the define __APPLE__).

We should simplify this. Only one code should handle this. Either the kiwixlib itself or the caller code, but not both.

Support OSM maps and markers in WikiVoyage

From the OTRS queue:
"The Wikivoyage website offers numeric markers in the text, usually in
the "See" section of articles, that open an OpenStreetMap map when
they are clicked. This feature is extremely useful when visiting a
place: the markers in the text and on the map are the easiest way to
find one's way to a mentioned landmark.

Wikivoyage European Travels and Wikivoyage Offline Travel Book do not
support this feature. Instead of markers there are non-clickable "1s",
see attached pictures.

Could you please consider supporting this feature? It would be
immensely useful. The map itself need not be offline (with proper
warning about data usage), however if it is, it's an added bonus
(perhaps with a map download feature similar to the ones in Google
Maps and MAPS.ME)."

Although come to think of it this is much more a mwoffliner isssue than Android, isn't it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.