diff --git a/README.md b/README.md index 85f438ca..d7a6eea6 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ The 3.x branch is a full rewrite using modern technologies like **Jetpack Compos * **Update Sources**: Find updates from **APKMirror**, **Aptoide**, **F-Droid** and **GitHub**. * **Search Sources**: Find new apps to install from **APKMirror**, **Aptoide**, **F-Droid** and **GitHub**. * Schedule **background update checks** and receive a **notification** when updates are found. -* Supports **Android 7.0** (**24**) to **Android 14** (**34**). +* Supports **Android 5** (**21**) to **Android 14** (**34**). * Supports **Android TV**. * **Material Design 3** with **Dark**, **Light** and **System** theme support. * Supports **Material You** on Android 12+. diff --git a/app/build.gradle b/app/build.gradle index 99828be6..8fa34af0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,7 +9,7 @@ android { defaultConfig { applicationId "com.apkupdater" - minSdk 24 + minSdk 21 targetSdk 34 versionCode 48 versionName "3.0.0-beta-05" diff --git a/app/src/main/java/com/apkupdater/data/github/GitHubApp.kt b/app/src/main/java/com/apkupdater/data/github/GitHubApp.kt index e54a8adb..9025d827 100644 --- a/app/src/main/java/com/apkupdater/data/github/GitHubApp.kt +++ b/app/src/main/java/com/apkupdater/data/github/GitHubApp.kt @@ -20,5 +20,11 @@ val GitHubApps = listOf( GitHubApp("com.fsck.k9", "thundernest", "k-9"), GitHubApp("de.tutao.tutanota", "tutao", "tutanota"), GitHubApp("com.shabinder.spotiflyer", "Shabinder", "SpotiFlyer"), - GitHubApp("org.koreader.launcher", "koreader", "koreader") + GitHubApp("org.koreader.launcher", "koreader", "koreader"), + GitHubApp("org.koreader.launcher", "koreader", "koreader"), + GitHubApp("com.amaze.filemanager", "TeamAmaze", "AmazeFileManager"), + GitHubApp("me.zhanghai.android.files", "zhanghai", "MaterialFiles"), + GitHubApp("dev.ukanth.ufirewall", "ukanth", "afwall"), + GitHubApp("com.ichi2.anki", "ankidroid", "Anki-Android"), + GitHubApp("com.simplemobiletools.flashlight", "SimpleMobileTools", "Simple-Flashlight") ) diff --git a/app/src/main/java/com/apkupdater/ui/component/Text.kt b/app/src/main/java/com/apkupdater/ui/component/Text.kt index e8f0618b..c799db15 100644 --- a/app/src/main/java/com/apkupdater/ui/component/Text.kt +++ b/app/src/main/java/com/apkupdater/ui/component/Text.kt @@ -2,8 +2,6 @@ package com.apkupdater.ui.component import androidx.compose.animation.animateContentSize import androidx.compose.animation.core.LinearEasing -import androidx.compose.animation.core.RepeatMode -import androidx.compose.animation.core.infiniteRepeatable import androidx.compose.animation.core.tween import androidx.compose.foundation.ScrollState import androidx.compose.foundation.background @@ -119,16 +117,20 @@ fun ScrollableText( val outer = remember { mutableStateOf(IntSize.Zero) } val effect: suspend (ScrollState) -> Unit = { - it.scrollTo(0) + state.scrollTo(0) val scroll = (inner.value.width - outer.value.width) if (scroll > 0) { - it.animateScrollTo( - scroll, - infiniteRepeatable( - animation = tween(durationMillis = scroll * 10, easing = LinearEasing), - repeatMode = RepeatMode.Reverse + while(true) { + state.animateScrollTo( + scroll, + tween(delayMillis = 1000, durationMillis = scroll * 10, easing = LinearEasing) ) - ) + state.animateScrollTo( + 0, + tween(delayMillis = 1000, durationMillis = scroll * 10, easing = LinearEasing) + ) + } + } } LaunchedEffect(outer.value) { effect(state) } diff --git a/app/src/main/java/com/apkupdater/ui/screen/MainScreen.kt b/app/src/main/java/com/apkupdater/ui/screen/MainScreen.kt index 29ca704e..789b5604 100644 --- a/app/src/main/java/com/apkupdater/ui/screen/MainScreen.kt +++ b/app/src/main/java/com/apkupdater/ui/screen/MainScreen.kt @@ -56,6 +56,7 @@ import com.apkupdater.viewmodel.MainViewModel import com.apkupdater.viewmodel.SearchViewModel import com.apkupdater.viewmodel.SettingsViewModel import com.apkupdater.viewmodel.UpdatesViewModel +import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flowOn import kotlinx.coroutines.flow.launchIn @@ -63,7 +64,6 @@ import kotlinx.coroutines.flow.onEach import org.koin.androidx.compose.koinViewModel import org.koin.core.parameter.parametersOf import kotlin.coroutines.CoroutineContext -import kotlin.coroutines.EmptyCoroutineContext @Composable @@ -148,7 +148,7 @@ suspend fun handleSnack( @Composable fun Flow.CollectAsEffect( - context: CoroutineContext = EmptyCoroutineContext, + context: CoroutineContext = Dispatchers.IO, block: suspend (T) -> Unit ) { LaunchedEffect(Unit) { diff --git a/app/src/main/java/com/apkupdater/util/SessionInstaller.kt b/app/src/main/java/com/apkupdater/util/SessionInstaller.kt index 768937d0..708f7576 100644 --- a/app/src/main/java/com/apkupdater/util/SessionInstaller.kt +++ b/app/src/main/java/com/apkupdater/util/SessionInstaller.kt @@ -29,7 +29,10 @@ class SessionInstaller(private val context: Context) { val packageInstaller: PackageInstaller = context.packageManager.packageInstaller val params = PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INSTALL) params.setAppPackageName(packageName) - params.setOriginatingUid(android.os.Process.myUid()) + + if (Build.VERSION.SDK_INT > 24) { + params.setOriginatingUid(android.os.Process.myUid()) + } if (Build.VERSION.SDK_INT >= 31) { params.setRequireUserAction(PackageInstaller.SessionParams.USER_ACTION_NOT_REQUIRED) diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 87cecac4..00000000 --- a/build.gradle +++ /dev/null @@ -1,5 +0,0 @@ -plugins { - id 'com.android.application' version '8.1.0' apply false - id 'com.android.library' version '8.1.0' apply false - id 'org.jetbrains.kotlin.android' version '1.9.0' apply false -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 00000000..435b80a7 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + id("com.android.application") version "8.1.1" apply false + id("org.jetbrains.kotlin.android") version "1.9.0" apply false +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b5606979..bdac3005 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle.kts similarity index 75% rename from settings.gradle rename to settings.gradle.kts index ea3936a2..a156e705 100644 --- a/settings.gradle +++ b/settings.gradle.kts @@ -11,9 +11,9 @@ dependencyResolutionManagement { repositories { google() mavenCentral() - maven { url 'https://jitpack.io' } + maven("https://jitpack.io") } } -rootProject.name = "ApkUpdater" -include ':app' +rootProject.name = "APKUpdater" +include(":app")