diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 555bbde2e..75ba9a301 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -14,8 +14,8 @@ jobs:
steps:
- uses: subosito/flutter-action@v1
with:
- channel: stable
- flutter-version: '1.22.6'
+ channel: dev
+ flutter-version: '2.1.0-12.1.pre'
- name: Clone the repository.
uses: actions/checkout@v2
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index d35450f7f..900706c0f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -16,8 +16,8 @@ jobs:
- uses: subosito/flutter-action@v1
with:
- channel: stable
- flutter-version: '1.22.6'
+ channel: dev
+ flutter-version: '2.1.0-12.1.pre'
# Workaround for this Android Gradle Plugin issue (supposedly fixed in AGP 4.1):
# https://issuetracker.google.com/issues/144111441
@@ -50,8 +50,8 @@ jobs:
echo "${{ secrets.KEY_JKS }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.KEY_JKS_PASSPHRASE }}" --batch release.keystore.asc > $AVES_STORE_FILE
rm release.keystore.asc
- flutter build apk --bundle-sksl-path shaders_1.22.6.sksl.json
- flutter build appbundle --bundle-sksl-path shaders_1.22.6.sksl.json
+ flutter build apk --bundle-sksl-path shaders_2.1.0-12.1.pre.sksl.json
+ flutter build appbundle --bundle-sksl-path shaders_2.1.0-12.1.pre.sksl.json
rm $AVES_STORE_FILE
env:
AVES_STORE_FILE: ${{ github.workspace }}/key.jks
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b66683330..6be5a8796 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
+## [v1.3.6] - 2021-03-18
+### Added
+- Korean translation
+- cover selection for albums / countries / tags
+
+### Changed
+- Upgraded Flutter to dev v2.1.0-12.1.pre
+
+### Fixed
+- various TIFF decoding fixes
+
## [v1.3.5] - 2021-02-26
### Added
- support Android KitKat, Lollipop & Marshmallow (API 19 ~ 23)
diff --git a/README.md b/README.md
index 81b930ab2..94b801598 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
Aves is a gallery and metadata explorer app. It is built for Android, with Flutter.
-

+

## Features
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 5247b3a54..f33882cb3 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -104,11 +104,11 @@ repositories {
dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
- implementation 'androidx.core:core-ktx:1.5.0-beta01' // v1.5.0-alpha02+ for ShortcutManagerCompat.setDynamicShortcuts
+ implementation 'androidx.core:core-ktx:1.5.0-beta03' // v1.5.0-alpha02+ for ShortcutManagerCompat.setDynamicShortcuts
implementation 'androidx.exifinterface:exifinterface:1.3.2'
implementation 'com.commonsware.cwac:document:0.4.1'
implementation 'com.drewnoakes:metadata-extractor:2.15.0'
- implementation 'com.github.deckerst:Android-TiffBitmapFactory:f87db4305d' // forked, built by JitPack
+ implementation 'com.github.deckerst:Android-TiffBitmapFactory:876e53870a' // forked, built by JitPack
implementation 'com.github.bumptech.glide:glide:4.12.0'
kapt 'androidx.annotation:annotation:1.1.0'
diff --git a/android/app/src/debug/res/values-ko/strings.xml b/android/app/src/debug/res/values-ko/strings.xml
new file mode 100644
index 000000000..4fff58c6e
--- /dev/null
+++ b/android/app/src/debug/res/values-ko/strings.xml
@@ -0,0 +1,4 @@
+
+
+ 아베스 [Debug]
+
\ No newline at end of file
diff --git a/android/app/src/main/kotlin/deckers/thibault/aves/MainActivity.kt b/android/app/src/main/kotlin/deckers/thibault/aves/MainActivity.kt
index 7e4504e63..7f43f5215 100644
--- a/android/app/src/main/kotlin/deckers/thibault/aves/MainActivity.kt
+++ b/android/app/src/main/kotlin/deckers/thibault/aves/MainActivity.kt
@@ -34,6 +34,7 @@ class MainActivity : FlutterActivity() {
MethodChannel(messenger, AppShortcutHandler.CHANNEL).setMethodCallHandler(AppShortcutHandler(this))
MethodChannel(messenger, DebugHandler.CHANNEL).setMethodCallHandler(DebugHandler(this))
MethodChannel(messenger, ImageFileHandler.CHANNEL).setMethodCallHandler(ImageFileHandler(this))
+ MethodChannel(messenger, GeocodingHandler.CHANNEL).setMethodCallHandler(GeocodingHandler(this))
MethodChannel(messenger, MediaStoreHandler.CHANNEL).setMethodCallHandler(MediaStoreHandler(this))
MethodChannel(messenger, MetadataHandler.CHANNEL).setMethodCallHandler(MetadataHandler(this))
MethodChannel(messenger, StorageHandler.CHANNEL).setMethodCallHandler(StorageHandler(this))
diff --git a/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/GeocodingHandler.kt b/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/GeocodingHandler.kt
new file mode 100644
index 000000000..874c32d97
--- /dev/null
+++ b/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/GeocodingHandler.kt
@@ -0,0 +1,82 @@
+package deckers.thibault.aves.channel.calls
+
+import android.content.Context
+import android.location.Geocoder
+import io.flutter.plugin.common.MethodCall
+import io.flutter.plugin.common.MethodChannel
+import io.flutter.plugin.common.MethodChannel.MethodCallHandler
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.GlobalScope
+import kotlinx.coroutines.launch
+import java.util.*
+
+// as of 2021/03/10, geocoding packages exist but:
+// - `geocoder` is unmaintained
+// - `geocoding` method does not return `addressLine` (v2.0.0)
+class GeocodingHandler(private val context: Context) : MethodCallHandler {
+ private var geocoder: Geocoder? = null
+
+ override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
+ when (call.method) {
+ "getAddress" -> GlobalScope.launch(Dispatchers.IO) { Coresult.safe(call, result, ::getAddress) }
+ else -> result.notImplemented()
+ }
+ }
+
+ private fun getAddress(call: MethodCall, result: MethodChannel.Result) {
+ val latitude = call.argument("latitude")?.toDouble()
+ val longitude = call.argument("longitude")?.toDouble()
+ val localeString = call.argument("locale")
+ val maxResults = call.argument("maxResults") ?: 1
+ if (latitude == null || longitude == null) {
+ result.error("getAddress-args", "failed because of missing arguments", null)
+ return
+ }
+
+ if (!Geocoder.isPresent()) {
+ result.error("getAddress-unavailable", "Geocoder is unavailable", null)
+ return
+ }
+
+ geocoder = geocoder ?: if (localeString != null) {
+ val split = localeString.split("_")
+ val language = split[0]
+ val country = if (split.size > 1) split[1] else ""
+ Geocoder(context, Locale(language, country))
+ } else {
+ Geocoder(context)
+ }
+
+ val addresses = try {
+ geocoder!!.getFromLocation(latitude, longitude, maxResults) ?: ArrayList()
+ } catch (e: Exception) {
+ result.error("getAddress-exception", "failed to get address", e.message)
+ return
+ }
+
+ if (addresses.isEmpty()) {
+ result.error("getAddress-empty", "failed to find any address for latitude=$latitude, longitude=$longitude", null)
+ } else {
+ val addressMapList: ArrayList