Giter Site home page Giter Site logo

kiwix / kiwix-android-custom Goto Github PK

View Code? Open in Web Editor NEW
13.0 10.0 9.0 8.72 MB

Necessary data/tools for the Android custom apps

Home Page: https://play.google.com/store/apps/developer?id=Kiwix+Team

License: GNU General Public License v3.0

Python 95.88% Shell 4.12%

kiwix-android-custom's Introduction

Kiwix Android Custom Apps

Kiwix Android custom apps are Android apps running Kiwix for Android against a pre-configured ZIM file.

Kiwix publishes more than a dozen of such apps. [Wikimed

This project contains data and scripts needed to create specific custom Kiwix Android apps. It does not create the app, that's done separately by running the relevant Gradle command to build one or more custom apps.

CD License: GPL v3

Disclaimer

This document is for publishers who aim to publish new custom apps. If you are a developer and want to have an in-depth understanding about the custom apps, please read CONTRIBUTING.md.

Custom app folder

In the repository, each custom configuration is isolated in a so called custom app folder. If you need to create a new one for a new custom app, you can do that easily using Github UI. Go to https://github.com/kiwix/kiwix-android-custom/new/main, put the name of your app (no space, lowercase only) and add a slash at the end.

Description json file

The configuration of the custom app is handled using the info.json file which is in the custom app folder. Take example on an already existing one if you need to create a new custom app. The most important fields are:

  • app_name, the title of the app
  • zim_url, the ZIM online URL (to download to create the app)
  • enforced_lang, the language code of the content (and the app UI)
  • disable_sidebar, a boolean value, when set to true, it hides the sidebar
  • disable_tabs, a boolean value, when set to true, it deactivates the multi-tabs feature
  • disable_read_aloud, a boolean value, when set to true, it disable the text-to-speech feature
  • disable_title, a boolean value, when set to true, it disable the app title and set the app icon to hamburger
  • disable_external_links, a boolean value when set to true, it disables the external link popup and hides the external links preference from the settings.
  • about_the_app, a URL, when it is set, it adds an About app_name app item to the sidebar app_name will be replaced with the actual app name. Clicking it opens the URL in an external web browser
  • support_url, a URL, when it is set, it adds an Support app_name item to the sidebar app_name will be replaced with the actual app name. Clicking it opens the URL in an external web browser
  • new, A boolean value, when set to true, it triggers the creation and storage of a dummy release Bundle during the current workflow run.
  • upload_bundle A boolean value. When set to true, it uploads the bundle to the Play Store, Otherwise, it uploads the APK.

You can also create this new file using Github IO. Go to https://github.com/kiwix/kiwix-android-custom/new/main and type info.json.

Remark: If you make a simple update, just replace the zim_url with the latest available zim from download.kiwix.org/zim. Then comment your commit (e.g. "updated to YYYY-MM zim") and commit directly to main branch. You won't have to change anything more than this (just tagging the release, see below).

Icon master

The Icon master is file icon.png you find (or have to create) in the custom app folder. It is a square PNG file which is used as master to create the Icon set (see section below). This master has to match many constraints and you might even have to create an icon_foreground.png and icon_baground.png to achieve to do certain things. Look at the Android documentation about adaptive icons to know more.

Icon set

The Android custom app needs an Icon set to build properly. This Icon set is needed to properly show the app icon on user devices and is a list of bitmap pictures which are derivatives of an icon master.

To create this Icon set, follow these steps:

  1. Create a new empty project with Android Studio (add no activity > next > finish)
  2. In the project view (top left) there should be a dropdown that says Android select that and choose Project, this will make the project view display accurately to the file system
  3. Delete MyApplication/app/src/main/res
  4. Right click MyApplication/app in android studio, click New>Image Asset to open Asset Studio (if this option is greyed out you will have to wait for indexing to finish, this shouldn't take longer than 2 minutes)
  5. For foreground layer Source Asset > Asset Type choose Image
  6. For path click the folder icon and browse to the output of gen-std-icon.py
  7. For background layer Source Asset > Asset Type choose Color
  8. Click on the color box
  9. This should present the color chooser, the box in the top right with the label # should be auto selected. Type FFFFFF to supply white as the color, this is typically the color used
  10. [Optional] go back to foreground layer and size the icon as appropriate with the slider
  11. Next > Finish will generate a res folder with all the icons needed in the location where you previously deleted the res folder.
  12. Cut and paste the res folder to kiwix-android-custom/whatever-directory-this-icon-set-is-for

These instructions are for a first time setup, you can reuse this project in the future for icon generation so many steps can be omitted.

Version name

The custom app will have a version name displayed on the Google Play store. This version name has to be a date in the format YYYY-MM (for example 2018-10. This version name should be the date of the content (neither the date of the Software nor the release date).

The app version name is determined in that order:

  1. The date can be hardcoded in the json file at the key version_name. Considering that this needs maintenance and that the publisher can easily create a discrepency with the ZIM content date, this should probably be avoided in most of the time.
  2. If nothing is specified in the json, then it tries to extract it from the ZIM file name. If the file - specified in zim_url - is wikipedia_en_all_maxi_2018-10.zim then it will be 2018-10.
  3. Otherwise the current date will be put (should be avoided).

Releasing

Simply tag the repo in git with the name of a custom app, for example:

git tag -f tunisie
git push -f origin tunisie

then Go to the release tab and click on "Draft a new release". As "tag version" use the custom app folder name (e.g. wikimedar). Publish by adding for example "WikiMed FA 2021-06" as title, no description is needed.

This triggers a Github action that will build an app Bundle using kiwix-android main branch and the illustrations/icons set/json defined in this repository.

The very first release has to be done manually. Put the new attribute so the release management action provides you the dummy first bundle to upload.

All other further releases (without the new attribute in the json.info) are then uploaded automatically to the Google Play app store as draft. Therefore, once released, go then to the Google Play Store Admin dashboard for the corresponding app and go to menu "Publication management" > "App version": under "Internal Testing", you can click on "Modify version". After a couple of hours the new version of the app should be listed in the public Play Store.

License

GPLv3 or later, see LICENSE for more details.

kiwix-android-custom's People

Contributors

borisfba avatar eladkishon avatar gouri-panda avatar gremid avatar julianharty avatar kelson42 avatar macgills avatar mgautierfr avatar mhutti1 avatar mohitmalideveloper avatar mohitmaliftechiz avatar popolechien avatar rashiq avatar rgaudin avatar utkarshmttl avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kiwix-android-custom's Issues

Which format works best for layout design files?

We've concluded the design contest for the Wiktionary app, and the designer asks if is it okay if she sends the XD file of these screens instead of PSD or Sketch.

@macgills Is there any significant difference for us between these file formats?

Impossible to build custom apps with Kiwix Android 2.4

The CI fails to go through because the install version of NDK is not the right one (the same as in kiwix/kiwix-android). See https://github.com/kiwix/kiwix-android-custom/runs/2296262609?check_suite_focus=true

Execution failed for task ':custom:stripWikispeciesReleaseDebugSymbols'.
> No version of NDK matched the requested version 22.0.7026061. Versions available locally: 21.4.7075529, 21.4.7075529, 21.4.7075529

I believe the problem is that we should in kiwix-android-custom request to install the same NDK as for kiwix/kiwix-android... for the moment it just have the default version

WikiMed app- Credits#Contributors color on night mode

Hello,

On Android WikiMed app (I tired EN. & AR.), the blue color of (Contributors) links on Credits section on night mode appear painful for eyes and can't be read easily.

I notice that personally and from another friends (3) who using the app.

Thanks.
Screenshot_2020-02-08-16-52-47

Publish custom apps “Wikivoyage” and “Chemistry & Physics simulations” in F-Droid

@4tip commented on Sep 23, 2019, 8:17 PM UTC:

A app called Kiwix, created by “Kiwix Team” is available in F-Droid and I wonder if someone could get two other apps by “Kiwix Team” to the F-Droid repo?? Or release the source code, that F-Droid workers can use to include the apps in F-Droid?
The names of the apps are “Wikivoyage” and “Chemistry & Physics simulations”.

App-Link: https://play.google.com/store/apps/details?id=org.kiwix.kiwixcustomwikivoyage 2

App-Link:https://play.google.com/store/apps/details?id=org.kiwix.kiwixcustomphet

This issue was moved by kelson42 from kiwix/overview#21.

Is it OK to submit the Wikivoyage app to F-Droid?

Many Android users don't have access to Google Play, for instance in China or LineageOS users.
Making the app available on F-Droid would allow these people to use the app.
The Wikivoyage community is also asking for this.

We could just take the source code and build/publish it, but F-Droid has a principle of asking app developers before doing it, so you just need to write "OK" here :-)

Thanks!

Custom app should be able to download zim from external URL

Here is the scenario:

  • We want to produce an app with an extremely large zim file (e.g. more than 2 Gb), so much so that going through the playstore is not a viable option;
  • User would therefore download a "shell app" (ie Kiwix-custom") which would in turn download and install the target zim file after it's been installed;
  • (maybe a separate ticket?): the app would check when there's a new zim available and flag it to the user one way or the other (for instance with an "update content" button in the settings that would be greyed out when no such new content is available; I'd be wary of automated updates as users often are in atypical connectivity configurations).

@macgills 1. Would that be possible? and 2. How many days of dev work do you reckon it would take to implement the "separate download" approach?

How can I build an android custom app for offline deployment

Users who have no internet connection can not get to the Google playstore, so Internet in a Box provides kiwix apks with embedded zims that can be loaded to an android phone directly from the server. In previous versions of the custom app builder the json file could be passed as an argument and this json file could have embed_zim: true. It could also have other parameters set to custom values. It looks like this is no longer supported.

The two wiki pages for this repo describe building apks for the Google playstore either with Travis or without using the json files in https://github.com/kiwix/kiwix-android-custom, all of which have embed_zim false.

What are the parameters to pass to build_custom_app.py to get an embedded zim, either built locally or built on Travis for upload to a public site or for download and not to upload to Google? Or is there an alternate method of obtaining an apk with embedded zim?

Update arabic Wikimed app

Last zim is from January and the content on the app is probably older. We have many pings on that on the Arabic FB page. Thank you.

Update tagging release methodology

Currently we push a tag of a name eg phet to trigger a release of a custom app against master of kiwix-android

This leads to some confusion about what version of the app is published for a custom app.

We should update our workflow and tagging procedure so that we push the tag phet:3.3.4 on this repo to do a release of phet with 3.3.4 of kiwix-android

Update Phet Play store images

The Phet play store images are outdated. A few other apps might be as well. Maybe look into doing this automatically on release.

Remove images from WikiVoyage apps

As discussed in recent Foundation research, file size is paramount to user acceptance: images currently bring little value as they are not maps, and removing them could help gain a few hundred megabytes on the app's size.

Update Arabic Wikimed app

Hello,

Last zim is from September 2018 and the content on the app is probably older. We have many pings on that on Arabic Wikipedia WikiProject Medicine and on Arabic Wikipedia official Facebook page. Thank you.

Wikimed mini opens on empty/blank screen

The issue remains when I close/ reopen the app. Clicking on Home does not take me anywhere. Closing the currently open article brings me back to a blank screen as well.
Version 2018-08 build 1182421. Other than that the app works fine as far as I can tell.

Typo in this project's description

I don't have permission to edit the description otherwise I'd edit it directly. It currently says tols and should probably say tools.

Necessary data/tols for the Android custom apps

Remove "caption" string from Minimed infobox

(maybe this should go to mwoffliner/issues - let me know)
Wikimed mini removes images but keeps captions, which is kind of weird (see image).

caption

The infobox string is
| image =
|caption = xyz
|nextfield = blablabla

I'd surmise a simple regexp would do the trick?

Update WikiVoyage apps

Both Wikivoyage apps (the regular one and the Europe one) were last updated in January 2020 and seem to describe Ukraine as a pleasant and funky destination o_0

Fixes for build-custom-app

@kelson42 commented on Jun 26, 2017, 6:51 PM UTC:

  • Explain how to install ruby
  • Explain how to install travis (the travis doc is big)
  • Talk about "hash -r"
  • Put a word about "kiwix-android-custom" that people know where to modify things
  • zim_url and zim_content should be merged (in zim?)
  • remove version_code fron info.json
  • add httpslib2 in the deps
  • add google-api-python-client in the deps
  • add space before "if you found it"

This issue was moved by kelson42 from kiwix/kiwix-android#1218.

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.