diff --git a/CHANGELOG.md b/CHANGELOG.md index 481caeaaf..9e879f3f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,9 @@ All notable changes to this project will be documented in this file. ### Added +- set wallpaper from any media - optional dynamic accent color on Android 12+ +- support Android 13 (API 33) - Turkish translation (thanks metezd) ### Changed diff --git a/android/app/build.gradle b/android/app/build.gradle index a8d4c0b0a..78f84d8c2 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -41,7 +41,7 @@ if (keystorePropertiesFile.exists()) { } android { - compileSdkVersion 32 + compileSdkVersion 33 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -57,7 +57,7 @@ android { // which implementation `DocumentBuilderImpl` is provided by the OS and is not customizable on Android, // but the implementation on API <19 is not robust enough and fails to build XMP documents minSdkVersion 19 - targetSdkVersion 32 + targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName manifestPlaceholders = [googleApiKey: keystoreProperties['googleApiKey']] @@ -154,7 +154,7 @@ repositories { dependencies { implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2' - implementation 'androidx.core:core-ktx:1.7.0' + implementation 'androidx.core:core-ktx:1.8.0' implementation 'androidx.exifinterface:exifinterface:1.3.3' implementation 'androidx.multidex:multidex:2.0.1' implementation 'com.caverock:androidsvg-aar:1.4' diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 4ff854b4c..68c90244b 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -6,11 +6,11 @@ Scoped storage on Android Q is inconvenient because users need to confirm edition on each individual file. So we request `WRITE_EXTERNAL_STORAGE` until Q (29), and enable `requestLegacyExternalStorage` --> - - - - - + + + + + + + @@ -138,6 +142,7 @@ + diff --git a/android/app/src/main/kotlin/deckers/thibault/aves/AnalysisService.kt b/android/app/src/main/kotlin/deckers/thibault/aves/AnalysisService.kt index 01752c888..aa84e0c63 100644 --- a/android/app/src/main/kotlin/deckers/thibault/aves/AnalysisService.kt +++ b/android/app/src/main/kotlin/deckers/thibault/aves/AnalysisService.kt @@ -159,7 +159,7 @@ class AnalysisService : MethodChannel.MethodCallHandler, Service() { COMMAND_START -> { runBlocking { FlutterUtils.runOnUiThread { - val entryIds = data.get(KEY_ENTRY_IDS)?.takeIf { it is IntArray }?.let { (it as IntArray).toList() } + val entryIds = data.getIntArray(KEY_ENTRY_IDS)?.toList() backgroundChannel?.invokeMethod( "start", hashMapOf( "entryIds" to entryIds, 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 8791c688e..f7f1a5b4b 100644 --- a/android/app/src/main/kotlin/deckers/thibault/aves/MainActivity.kt +++ b/android/app/src/main/kotlin/deckers/thibault/aves/MainActivity.kt @@ -15,6 +15,7 @@ import app.loup.streams_channel.StreamsChannel import deckers.thibault.aves.channel.calls.* import deckers.thibault.aves.channel.streams.* import deckers.thibault.aves.utils.LogUtils +import deckers.thibault.aves.utils.getParcelableExtraCompat import io.flutter.embedding.android.FlutterActivity import io.flutter.plugin.common.EventChannel import io.flutter.plugin.common.MethodCall @@ -215,7 +216,7 @@ class MainActivity : FlutterActivity() { } } Intent.ACTION_VIEW, Intent.ACTION_SEND, "com.android.camera.action.REVIEW" -> { - (intent.data ?: (intent.getParcelableExtra(Intent.EXTRA_STREAM) as? Uri))?.let { uri -> + (intent.data ?: intent.getParcelableExtraCompat(Intent.EXTRA_STREAM))?.let { uri -> // MIME type is optional val type = intent.type ?: intent.resolveType(context) return hashMapOf( diff --git a/android/app/src/main/kotlin/deckers/thibault/aves/WallpaperActivity.kt b/android/app/src/main/kotlin/deckers/thibault/aves/WallpaperActivity.kt index 9091d8f53..d7f28867e 100644 --- a/android/app/src/main/kotlin/deckers/thibault/aves/WallpaperActivity.kt +++ b/android/app/src/main/kotlin/deckers/thibault/aves/WallpaperActivity.kt @@ -8,6 +8,7 @@ import app.loup.streams_channel.StreamsChannel import deckers.thibault.aves.channel.calls.* import deckers.thibault.aves.channel.streams.ImageByteStreamHandler import deckers.thibault.aves.utils.LogUtils +import deckers.thibault.aves.utils.getParcelableExtraCompat import io.flutter.embedding.android.FlutterActivity import io.flutter.plugin.common.MethodChannel @@ -79,7 +80,7 @@ class WallpaperActivity : FlutterActivity() { private fun extractIntentData(intent: Intent?): MutableMap { when (intent?.action) { Intent.ACTION_ATTACH_DATA, Intent.ACTION_SET_WALLPAPER -> { - (intent.data ?: (intent.getParcelableExtra(Intent.EXTRA_STREAM) as? Uri))?.let { uri -> + (intent.data ?: intent.getParcelableExtraCompat(Intent.EXTRA_STREAM))?.let { uri -> // MIME type is optional val type = intent.type ?: intent.resolveType(context) return hashMapOf( diff --git a/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/AppAdapterHandler.kt b/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/AppAdapterHandler.kt index 9437745a3..c5b2d2223 100644 --- a/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/AppAdapterHandler.kt +++ b/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/AppAdapterHandler.kt @@ -30,6 +30,8 @@ import deckers.thibault.aves.model.FieldMap import deckers.thibault.aves.utils.BitmapUtils import deckers.thibault.aves.utils.BitmapUtils.getBytes import deckers.thibault.aves.utils.LogUtils +import deckers.thibault.aves.utils.getApplicationInfoCompat +import deckers.thibault.aves.utils.queryIntentActivitiesCompat import io.flutter.plugin.common.MethodCall import io.flutter.plugin.common.MethodChannel import io.flutter.plugin.common.MethodChannel.MethodCallHandler @@ -77,7 +79,7 @@ class AppAdapterHandler(private val context: Context) : MethodCallHandler { } val pm = context.packageManager - for (resolveInfo in pm.queryIntentActivities(intent, 0)) { + for (resolveInfo in pm.queryIntentActivitiesCompat(intent, 0)) { val appInfo = resolveInfo.activityInfo.applicationInfo val packageName = appInfo.packageName if (!packages.containsKey(packageName)) { @@ -149,7 +151,7 @@ class AppAdapterHandler(private val context: Context) : MethodCallHandler { val size = (sizeDip * density).roundToInt() var data: ByteArray? = null try { - val iconResourceId = context.packageManager.getApplicationInfo(packageName, 0).icon + val iconResourceId = context.packageManager.getApplicationInfoCompat(packageName, 0).icon if (iconResourceId != Resources.ID_NULL) { val uri = Uri.Builder() .scheme(ContentResolver.SCHEME_ANDROID_RESOURCE) @@ -444,4 +446,4 @@ class AppAdapterHandler(private val context: Context) : MethodCallHandler { } } } -} \ No newline at end of file +} 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 index 0821058f3..1c16e2b02 100644 --- 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 @@ -1,12 +1,17 @@ package deckers.thibault.aves.channel.calls import android.content.Context +import android.location.Address import android.location.Geocoder +import android.os.Build import deckers.thibault.aves.channel.calls.Coresult.Companion.safe import io.flutter.plugin.common.MethodCall import io.flutter.plugin.common.MethodChannel import io.flutter.plugin.common.MethodChannel.MethodCallHandler -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.launch import java.io.IOException import java.util.* @@ -48,36 +53,48 @@ class GeocodingHandler(private val context: Context) : MethodCallHandler { Geocoder(context) } - val addresses = try { - geocoder!!.getFromLocation(latitude, longitude, maxResults) ?: ArrayList() - } catch (e: IOException) { - // `grpc failed`, etc. - result.error("getAddress-network", "failed to get address because of network issues", e.message) - return - } catch (e: Exception) { - result.error("getAddress-exception", "failed to get address", e.message) - return + fun processAddresses(addresses: List
) { + if (addresses.isEmpty()) { + result.error("getAddress-empty", "failed to find any address for latitude=$latitude, longitude=$longitude", null) + } else { + val addressMapList: ArrayList> = ArrayList(addresses.map { address -> + hashMapOf( + "addressLine" to (0..address.maxAddressLineIndex).joinToString(", ") { i -> address.getAddressLine(i) }, + "adminArea" to address.adminArea, + "countryCode" to address.countryCode, + "countryName" to address.countryName, + "featureName" to address.featureName, + "locality" to address.locality, + "postalCode" to address.postalCode, + "subAdminArea" to address.subAdminArea, + "subLocality" to address.subLocality, + "subThoroughfare" to address.subThoroughfare, + "thoroughfare" to address.thoroughfare, + ) + }) + result.success(addressMapList) + } } - if (addresses.isEmpty()) { - result.error("getAddress-empty", "failed to find any address for latitude=$latitude, longitude=$longitude", null) - } else { - val addressMapList: ArrayList> = ArrayList(addresses.map { address -> - hashMapOf( - "addressLine" to (0..address.maxAddressLineIndex).joinToString(", ") { i -> address.getAddressLine(i) }, - "adminArea" to address.adminArea, - "countryCode" to address.countryCode, - "countryName" to address.countryName, - "featureName" to address.featureName, - "locality" to address.locality, - "postalCode" to address.postalCode, - "subAdminArea" to address.subAdminArea, - "subLocality" to address.subLocality, - "subThoroughfare" to address.subThoroughfare, - "thoroughfare" to address.thoroughfare, - ) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + geocoder!!.getFromLocation(latitude, longitude, maxResults, object : Geocoder.GeocodeListener { + override fun onGeocode(addresses: List) = processAddresses(addresses.filterNotNull()) + + override fun onError(errorMessage: String?) { + result.error("getAddress-asyncerror", "failed to get address", errorMessage) + } }) - result.success(addressMapList) + } else { + try { + @Suppress("deprecation") + val addresses = geocoder!!.getFromLocation(latitude, longitude, maxResults) ?: ArrayList() + processAddresses(addresses) + } catch (e: IOException) { + // `grpc failed`, etc. + result.error("getAddress-network", "failed to get address because of network issues", e.message) + } catch (e: Exception) { + result.error("getAddress-exception", "failed to get address", e.message) + } } } diff --git a/android/app/src/main/kotlin/deckers/thibault/aves/metadata/ExifInterfaceHelper.kt b/android/app/src/main/kotlin/deckers/thibault/aves/metadata/ExifInterfaceHelper.kt index 7b6317506..a9ae20d6d 100644 --- a/android/app/src/main/kotlin/deckers/thibault/aves/metadata/ExifInterfaceHelper.kt +++ b/android/app/src/main/kotlin/deckers/thibault/aves/metadata/ExifInterfaceHelper.kt @@ -220,7 +220,7 @@ object ExifInterfaceHelper { // initialize metadata-extractor directories that we will fill // by tags converted from the ExifInterface attributes // so that we can rely on metadata-extractor descriptions - val dirs = DirType.values().associate { Pair(it, it.createDirectory()) } + val dirs = DirType.values().associateWith { it.createDirectory() } // exclude Exif directory when it only includes image size val isUselessExif = fun(it: Map): Boolean { diff --git a/android/app/src/main/kotlin/deckers/thibault/aves/utils/Compat.kt b/android/app/src/main/kotlin/deckers/thibault/aves/utils/Compat.kt new file mode 100644 index 000000000..cd7dffcfc --- /dev/null +++ b/android/app/src/main/kotlin/deckers/thibault/aves/utils/Compat.kt @@ -0,0 +1,37 @@ +package deckers.thibault.aves.utils + +import android.content.Intent +import android.content.pm.ApplicationInfo +import android.content.pm.PackageManager +import android.content.pm.ResolveInfo +import android.os.Build +import android.os.Parcelable + +inline fun Intent.getParcelableExtraCompat(name: String): T? { + return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + getParcelableExtra(name, T::class.java) + } else { + @Suppress("deprecation") + getParcelableExtra(name) as? T + } +} + + +fun PackageManager.getApplicationInfoCompat(packageName: String, flags: Int): ApplicationInfo { + return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + getApplicationInfo(packageName, PackageManager.ApplicationInfoFlags.of(flags.toLong())) + } else { + @Suppress("deprecation") + getApplicationInfo(packageName, flags) + } + +} + +fun PackageManager.queryIntentActivitiesCompat(intent: Intent, flags: Int): List { + return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + queryIntentActivities(intent, PackageManager.ResolveInfoFlags.of(flags.toLong())) + } else { + @Suppress("deprecation") + queryIntentActivities(intent, flags) + } +} diff --git a/android/app/src/main/res/drawable/ic_launcher_mono.xml b/android/app/src/main/res/drawable/ic_launcher_mono.xml new file mode 100644 index 000000000..738ecc287 --- /dev/null +++ b/android/app/src/main/res/drawable/ic_launcher_mono.xml @@ -0,0 +1,32 @@ + + + + + + + + diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 7353dbd1f..fe5fad39c 100644 --- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -2,4 +2,5 @@ + \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index 7353dbd1f..fe5fad39c 100644 --- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -2,4 +2,5 @@ + \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index 52ec57d77..4d7683bf2 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,17 +1,17 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.6.21' + ext.kotlin_version = '1.7.0' repositories { google() mavenCentral() maven { url 'https://developer.huawei.com/repo/' } } dependencies { - classpath 'com.android.tools.build:gradle:7.2.0' + classpath 'com.android.tools.build:gradle:7.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // GMS & Firebase Crashlytics (used by some flavors only) classpath 'com.google.gms:google-services:4.3.10' - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.0' // HMS (used by some flavors only) classpath 'com.huawei.agconnect:agcp:1.5.2.300' } diff --git a/fastlane/metadata/android/de/full_description.txt b/fastlane/metadata/android/de/full_description.txt index 6f57ace2b..7cfc6826c 100644 --- a/fastlane/metadata/android/de/full_description.txt +++ b/fastlane/metadata/android/de/full_description.txt @@ -2,4 +2,4 @@ Navigation und Suche ist ein wichtiger Bestandteil von Aves. Das Ziel besteht darin, dass Benutzer problemlos von Alben zu Fotos zu Tags zu Karten usw. wechseln können. -Aves lässt sich mit Android (von API 19 bis 32, d. h. von KitKat bis Android 12L) mit Funktionen wie App-Verknüpfungen und globaler Suche integrieren. Es funktioniert auch als Medienbetrachter und -auswahl. \ No newline at end of file +Aves lässt sich mit Android (von API 19 bis 33, d. h. von KitKat bis Android 13) mit Funktionen wie App-Verknüpfungen und globaler Suche integrieren. Es funktioniert auch als Medienbetrachter und -auswahl. \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt index eba12d85e..4b84e8ccd 100644 --- a/fastlane/metadata/android/en-US/full_description.txt +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -2,4 +2,4 @@ Navigation and search is an important part of Aves. The goal is for users to easily flow from albums to photos to tags to maps, etc. -Aves integrates with Android (from API 19 to 32, i.e. from KitKat to Android 12L) with features such as app shortcuts and global search handling. It also works as a media viewer and picker. \ No newline at end of file +Aves integrates with Android (from API 19 to 33, i.e. from KitKat to Android 13) with features such as app shortcuts and global search handling. It also works as a media viewer and picker. \ No newline at end of file diff --git a/fastlane/metadata/android/es-MX/full_description.txt b/fastlane/metadata/android/es-MX/full_description.txt index 68859bb5d..510b47759 100644 --- a/fastlane/metadata/android/es-MX/full_description.txt +++ b/fastlane/metadata/android/es-MX/full_description.txt @@ -2,4 +2,4 @@ La navegación y búsqueda son partes importantes de Aves. Su propósito es que los usuarios puedan fácimente ir de álbumes a fotos, etiquetas, mapas, etc. -Aves se integra con Android (desde API 19 a 32, por ej. desde KitKat hasta Android 12L) con características como vínculos de aplicación y manejo de búsqueda global. También funciona como un visor y seleccionador multimedia. \ No newline at end of file +Aves se integra con Android (desde API 19 a 33, por ej. desde KitKat hasta Android 13) con características como vínculos de aplicación y manejo de búsqueda global. También funciona como un visor y seleccionador multimedia. \ No newline at end of file diff --git a/fastlane/metadata/android/id/full_description.txt b/fastlane/metadata/android/id/full_description.txt index 60d4c271f..8eda6d0ba 100644 --- a/fastlane/metadata/android/id/full_description.txt +++ b/fastlane/metadata/android/id/full_description.txt @@ -2,4 +2,4 @@ Navigasi dan pencarian merupakan bagian penting dari Aves. Tujuannya adalah agar pengguna dengan mudah mengalir dari album ke foto ke tag ke peta, dll. -Aves terintegrasi dengan Android (dari API 19 ke 32, yaitu dari KitKat ke Android 12L) dengan fitur-fitur seperti pintasan aplikasi dan pencarian global penanganan. Ini juga berfungsi sebagai penampil dan pemilih media. \ No newline at end of file +Aves terintegrasi dengan Android (dari API 19 ke 33, yaitu dari KitKat ke Android 13) dengan fitur-fitur seperti pintasan aplikasi dan pencarian global penanganan. Ini juga berfungsi sebagai penampil dan pemilih media. \ No newline at end of file diff --git a/fastlane/metadata/android/it/full_description.txt b/fastlane/metadata/android/it/full_description.txt index d903944f7..502df17e5 100644 --- a/fastlane/metadata/android/it/full_description.txt +++ b/fastlane/metadata/android/it/full_description.txt @@ -2,4 +2,4 @@ Navigazione e ricerca sono una parte importante di Aves. L'obiettivo è che gli utenti passino facilmente dagli album alle foto, ai tag, alle mappe, ecc. -Aves si integra con Android (da API 19 a 32, cioè da KitKat ad Android 12L) con caratteristiche come collegamenti alle app e la gestione della ricerca globale. Funziona anche come visualizzazione e raccolta di media. +Aves si integra con Android (da API 19 a 33, cioè da KitKat ad Android 13) con caratteristiche come collegamenti alle app e la gestione della ricerca globale. Funziona anche come visualizzazione e raccolta di media. diff --git a/fastlane/metadata/android/ja/full_description.txt b/fastlane/metadata/android/ja/full_description.txt index f489d7765..07e57595b 100644 --- a/fastlane/metadata/android/ja/full_description.txt +++ b/fastlane/metadata/android/ja/full_description.txt @@ -4,4 +4,4 @@ ナビゲーションと検索は、Avesの重要な部分です。アルバムから写真、タグ、地図などへ簡単に移動できます。 -Avesは、アプリショートカットグローバル検索などの機能を、Android(API 19から32まで、つまりAndroid 4.4から12 Lまで)と統合しています。また、メディアビューワーメディアピッカーとしても機能します。 \ No newline at end of file +Avesは、アプリショートカットグローバル検索などの機能を、Android(API 19から33まで、つまりAndroid 4.4から13 Lまで)と統合しています。また、メディアビューワーメディアピッカーとしても機能します。 \ No newline at end of file diff --git a/fastlane/metadata/android/pt-BR/full_description.txt b/fastlane/metadata/android/pt-BR/full_description.txt index 76ce49ba4..657c4fa54 100644 --- a/fastlane/metadata/android/pt-BR/full_description.txt +++ b/fastlane/metadata/android/pt-BR/full_description.txt @@ -2,4 +2,4 @@ Navegação e pesquisa é uma parte importante do Aves. O objetivo é que os usuários fluam facilmente de álbuns para fotos, etiquetas, mapas, etc. -Aves integra com Android (de API 19 para 32, i.e. de KitKat para Android 12L) com recursos como atalhos de apps e pesquisa global manipulação. Também funciona como um visualizador e selecionador de mídia. +Aves integra com Android (de API 19 para 33, i.e. de KitKat para Android 13) com recursos como atalhos de apps e pesquisa global manipulação. Também funciona como um visualizador e selecionador de mídia. diff --git a/fastlane/metadata/android/tr/full_description.txt b/fastlane/metadata/android/tr/full_description.txt index 29f2c6873..507df09bf 100644 --- a/fastlane/metadata/android/tr/full_description.txt +++ b/fastlane/metadata/android/tr/full_description.txt @@ -2,4 +2,4 @@ Gezinme ve arama Aves'in önemli bir parçasıdır. Amaç, kullanıcıların albümlerden fotoğraflara, etiketlerden haritalara vb. kolayca geçmesini sağlamaktır. -Aves, uygulama kısayolları ve global arama işleme gibi özelliklerle Android (API 19'dan 32'ye, yani KitKat'tan Android 12L'ye kadar) ile entegre olur. Ayrıca bir medya görüntüleyici ve alıcı olarak da çalışır. \ No newline at end of file +Aves, uygulama kısayolları ve global arama işleme gibi özelliklerle Android (API 19'dan 33'ye, yani KitKat'tan Android 13'ye kadar) ile entegre olur. Ayrıca bir medya görüntüleyici ve alıcı olarak da çalışır. \ No newline at end of file diff --git a/fastlane/metadata/android/zh-CN/full_description.txt b/fastlane/metadata/android/zh-CN/full_description.txt index 02b2b4e57..ad4a076d4 100644 --- a/fastlane/metadata/android/zh-CN/full_description.txt +++ b/fastlane/metadata/android/zh-CN/full_description.txt @@ -2,4 +2,4 @@ 导航与搜索Aves 的核心功能之一,旨在帮助用户在相册、照片、标签、地图等之间轻松切换。 - Aves 与 Android(API 19-32,即从 KitKat 到 Android 12L)集成,具有快捷方式全局搜索等功能。它还可用作媒体查看器和选择器。 + Aves 与 Android(API 19-33,即从 KitKat 到 Android 13)集成,具有快捷方式全局搜索等功能。它还可用作媒体查看器和选择器。 diff --git a/lib/model/source/collection_source.dart b/lib/model/source/collection_source.dart index 2ce5a6f79..02b6c0b9f 100644 --- a/lib/model/source/collection_source.dart +++ b/lib/model/source/collection_source.dart @@ -416,6 +416,7 @@ abstract class CollectionSource with SourceBase, AlbumMixin, LocationMixin, TagM } } if (startAnalysisService) { + // TODO TLAD [tiramisu] explain foreground service and request POST_NOTIFICATIONS permission await AnalysisService.startService( force: force, entryIds: entries?.map((entry) => entry.id).toList(), diff --git a/pubspec.lock b/pubspec.lock index abbb7c316..ae64ed458 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -785,11 +785,13 @@ packages: source: hosted version: "9.2.0" permission_handler_android: - dependency: transitive + dependency: "direct overridden" description: - name: permission_handler_android - url: "https://pub.dartlang.org" - source: hosted + path: permission_handler_android + ref: HEAD + resolved-ref: "279cf44656272c6b89c73b16097108f3c973c31f" + url: "https://github.com/deckerst/flutter-permission-handler" + source: git version: "9.0.2+1" permission_handler_apple: dependency: transitive diff --git a/pubspec.yaml b/pubspec.yaml index b97064374..6feb05643 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -84,6 +84,13 @@ dependencies: url_launcher: xml: +dependency_overrides: + # TODO TLAD as of 2022/06/11, latest version (v9.0.2+1) does not support Android 13 storage permissions + permission_handler_android: + git: + url: https://github.com/deckerst/flutter-permission-handler + path: permission_handler_android + dev_dependencies: flutter_test: sdk: flutter