From 83af568619e948ab42022a66124a5b4fed708780 Mon Sep 17 00:00:00 2001 From: Sean Mac Gillicuddy Date: Wed, 21 Aug 2019 13:33:06 +0100 Subject: [PATCH 1/4] Storage Not Accessible in API 28 #1385 - partial fix in StorageDevice, spinner wasn't stopping in ZImFileSelectFragment --- .../java/eu/mhutti1/utils/storage/StorageDevice.kt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/mhutti1/utils/storage/StorageDevice.kt b/app/src/main/java/eu/mhutti1/utils/storage/StorageDevice.kt index 01214c164..dec720ec8 100644 --- a/app/src/main/java/eu/mhutti1/utils/storage/StorageDevice.kt +++ b/app/src/main/java/eu/mhutti1/utils/storage/StorageDevice.kt @@ -21,10 +21,12 @@ package eu.mhutti1.utils.storage import android.os.Build import android.os.StatFs +import android.util.Log import java.io.BufferedReader import java.io.File import java.io.FileReader import java.io.FileWriter +import java.io.IOException const val LOCATION_EXTENSION = "storageLocationMarker" @@ -73,16 +75,20 @@ data class StorageDevice( // Create unique file to identify duplicate devices. private fun createLocationCode() { if (!getLocationCodeFromFolder(file)) { - File(file.path, ".$LOCATION_EXTENSION").let { locationCode -> - locationCode.createNewFile() - FileWriter(locationCode).use { it.write(file.path) } + File(file, ".$LOCATION_EXTENSION").let { locationCode -> + try { + locationCode.createNewFile() + FileWriter(locationCode).use { it.write(file.path) } + } catch (ioException: IOException) { + Log.d("StorageDevice", "could not write file $file", ioException) + } } } } // Check if there is already a device code in our path private fun getLocationCodeFromFolder(folder: File): Boolean { - val locationCode = File(folder.path, ".$LOCATION_EXTENSION") + val locationCode = File(folder, ".$LOCATION_EXTENSION") if (locationCode.exists()) { try { BufferedReader(FileReader(locationCode)).use { br -> From e40fbc66542d04abe5091c620da4b91afe258074 Mon Sep 17 00:00:00 2001 From: Justin Biggs Date: Sat, 24 Aug 2019 13:09:53 -0500 Subject: [PATCH 2/4] #681 specify round icon in Android manifest --- app/src/main/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 67e65c981..6972af8cc 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,6 +17,7 @@ android:allowBackup="true" android:hardwareAccelerated="true" android:icon="@mipmap/kiwix_icon" + android:roundIcon="@mipmap/kiwix_icon_round" android:label="@string/app_name" android:networkSecurityConfig="@xml/network_security_config" android:supportsRtl="true" From 38270640c9e8e3b9008cd3f49e6a225fa3c4e471 Mon Sep 17 00:00:00 2001 From: Justin Biggs Date: Sun, 25 Aug 2019 14:41:31 -0500 Subject: [PATCH 3/4] #681 adjusted line order for style req --- app/src/main/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 6972af8cc..09389d7a9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,9 +17,9 @@ android:allowBackup="true" android:hardwareAccelerated="true" android:icon="@mipmap/kiwix_icon" - android:roundIcon="@mipmap/kiwix_icon_round" android:label="@string/app_name" android:networkSecurityConfig="@xml/network_security_config" + android:roundIcon="@mipmap/kiwix_icon_round" android:supportsRtl="true" android:theme="@style/AppTheme"> From 6dc009f2638e9567f105f2c21eeabf8186d9904c Mon Sep 17 00:00:00 2001 From: Kelson Date: Mon, 26 Aug 2019 14:34:54 +0200 Subject: [PATCH 4/4] Add a few badges to the README.md --- README.md | 58 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index aa45cee96..6a848470b 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,41 @@ - - + + 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 meta-data. +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 meta-data. -Kiwix is written in [Kotlin](https://kotlinlang.org/) (with a few old pieces in Java). +Kiwix is written in [Kotlin](https://kotlinlang.org/) (with a few old +pieces in Java). [![Build Status](https://travis-ci.org/kiwix/kiwix-android.svg?branch=master)](https://travis-ci.org/kiwix/kiwix-android) [![IRC Web](https://img.shields.io/badge/chat-on%20freenode-brightgreen.svg)](http://chat.kiwix.org) [![codecov](https://codecov.io/gh/kiwix/kiwix-android/branch/master/graph/badge.svg)](https://codecov.io/gh/kiwix/kiwix-android) [![CodeFactor](https://www.codefactor.io/repository/github/kiwix/kiwix-android/badge)](https://www.codefactor.io/repository/github/kiwix/kiwix-android) ---- +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) ## Build Instructions -Production releases of the app should be built with our companion build repository [kiwix-build](https://github.com/kiwix/kiwix-build). +Production releases of the app should be built with our companion +build repository [kiwix-build](https://github.com/kiwix/kiwix-build). -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. 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. +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. 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. -We utilize different build variants (flavours) to build various different versions of our app. Ensure your build variant is **kiwixDebug** to build the standard app. +We utilize different build variants (flavours) to build various +different versions of our app. Ensure your build variant is +`kiwixDebug` to build the standard app. ## Libraries Used @@ -38,29 +52,39 @@ We utilize different build variants (flavours) to build various different versio ## Contributing -Before contributing be sure to check out the [CONTRIBUTION](https://github.com/kiwix/kiwix-android/blob/master/CONTRIBUTING.md) guidelines. +Before contributing be sure to check out the +[CONTRIBUTION](https://github.com/kiwix/kiwix-android/blob/master/CONTRIBUTING.md) +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. +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](docs/codestyle.md) carefully. Pull requests that do not match the style will be rejected. + +For contributions please read the [CODESTYLE](docs/codestyle.md) +carefully. Pull requests that do not match the style will be rejected. ## Commit Style -For writing commit messages please read the [COMMITSTYLE](docs/commitstyle.md) carefully. Kindly adhere to the guidelines. Pull requests not matching the style will be rejected. +For writing commit messages please read the +[COMMITSTYLE](docs/commitstyle.md) carefully. Kindly adhere to the +guidelines. Pull requests not matching the style will be rejected. ## Communication -Please use IRC to discuss questions regarding the project: #kiwix on irc.freenode.net +Please use IRC to discuss questions regarding the project: #kiwix on +irc.freenode.net -You can use IRC web interface on [http://chat.kiwix.org/](http://chat.kiwix.org/). - -Our other sources of communications include +You can use IRC web interface on +[http://chat.kiwix.org/](http://chat.kiwix.org/). +Our other sources of communications include: - Email: contact@kiwix.org - Mailing list: kiwix-developer@lists.sourceforge.net -For more information, please refer to [https://wiki.kiwix.org/wiki/Communication](https://wiki.kiwix.org/wiki/Communication). +For more information, please refer to +[https://wiki.kiwix.org/wiki/Communication](https://wiki.kiwix.org/wiki/Communication). ## LEGAL & DISCLAIMER