Skip to content

Commit

Permalink
GitHub Source: Add support for LibreTube, SkyTube, Twire, NekoX, Elem…
Browse files Browse the repository at this point in the history
…ent, Mastodon, Simplex, Telegram FOSS, AirGuard, Exodus, Habits, Moonlight, Noice, RustDesk, Vigilante, Simple-Voice-Recorder, xBrowserSync, Tuner, Metronome

Fix crash after uninstalling app
ApkMirror source is disabled by default on Android TV
Revert to material3 alpha05 since alpha06 crashes
  • Loading branch information
rumboalla committed Aug 28, 2023
1 parent 266037a commit 1826b2b
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The 3.x branch is a full rewrite using modern technologies like **Jetpack Compos
* **Languages**: English, Spanish, Dutch, German, Traditional Chinese, Simplified Chinese, Romanian, Italian, Portuguese, Russian, Turkish.

# Download
* [Beta Release (3.0.0-beta-05)](https://github.com/rumboalla/apkupdater/releases/latest/download/com.apkupdater-release.apk)
* [Stable Release (3.0.0)](https://github.com/rumboalla/apkupdater/releases/latest/download/com.apkupdater-release.apk)
* [Older releases](https://github.com/rumboalla/apkupdater/releases)

# Translations
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ android {
applicationId = "com.apkupdater"
minSdk = 21
targetSdk = 34
versionCode = 48
versionName = "3.0.0-beta-05"
versionCode = 49
versionName = "3.0.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down Expand Up @@ -85,7 +85,7 @@ dependencies {
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.6.1")
implementation("androidx.compose.ui:ui:1.5.0")
implementation("androidx.tv:tv-foundation:1.0.0-alpha08")
implementation("androidx.compose.material3:material3:1.2.0-alpha06")
implementation("androidx.compose.material3:material3:1.2.0-alpha05")
implementation("androidx.work:work-runtime-ktx:2.8.1")
implementation("io.insert-koin:koin-android:3.4.2")
implementation("io.insert-koin:koin-androidx-compose:3.4.2")
Expand Down
21 changes: 20 additions & 1 deletion app/src/main/kotlin/com/apkupdater/data/github/GitHubApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,24 @@ val GitHubApps = listOf(
GitHubApp("com.arjanvlek.oxygenupdater", "oxygen-updater", "oxygen-updater"),
GitHubApp("com.beemdevelopment.aegis", "beemdevelopment", "Aegis"),
GitHubApp("code.name.monkey.retromusic", "RetroMusicPlayer", "RetroMusicPlayer"),
GitHubApp("org.blokada.origin.alarm", "blokadaorg", "blokada")
GitHubApp("org.blokada.origin.alarm", "blokadaorg", "blokada"),
GitHubApp("com.github.libretube", "libre-tube", "LibreTube"),
GitHubApp("free.rm.skytube.extra", "SkyTubeTeam", "SkyTube"),
GitHubApp("com.perflyst.twire", "twireapp", "Twire"),
GitHubApp("nekox.messenger", "NekoX-Dev", "NekoX"),
GitHubApp("im.vector.app", "vector-im", "element-android"),
GitHubApp("org.joinmastodon.android", "mastodon", "mastodon-android"),
GitHubApp("chat.simplex.app", "simplex-chat", "simplex-chat"),
GitHubApp("org.telegram.messenger.beta", "Telegram-FOSS-Team", "Telegram-FOSS"),
GitHubApp("de.seemoo.at_tracking_detection.release", "seemoo-lab", "AirGuard"),
GitHubApp("org.eu.exodus_privacy.exodusprivacy", "Exodus-Privacy", "exodus-android-app"),
GitHubApp("org.isoron.uhabits", "iSoron", "uhabits"),
GitHubApp("com.limelight", "moonlight-stream", "moonlight-android"),
GitHubApp("com.github.ashutoshgngwr.noice", "trynoice", "android-app"),
GitHubApp("com.carriez.flutter_hbb", "rustdesk", "rustdesk"),
GitHubApp("com.crazylegend.vigilante", "FunkyMuse", "Vigilante"),
GitHubApp("com.simplemobiletools.voicerecorder", "SimpleMobileTools", "Simple-Voice-Recorder"),
GitHubApp("com.xBrowserSync.android", "xbrowsersync", "app"),
GitHubApp("de.moekadu.metronome", "thetwom", "toc2"),
GitHubApp("de.moekadu.tuner", "thetwom", "Tuner")
)
2 changes: 1 addition & 1 deletion app/src/main/kotlin/com/apkupdater/prefs/Prefs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Prefs(
val ignoreBeta = boolean("ignoreBeta", defValue = true, backed = true)
val ignorePreRelease = boolean("ignorePreRelease", defValue = true, backed = true)
val useSafeStores = boolean("useSafeStores", defValue = true, backed = true)
val useApkMirror = boolean("useApkMirror", defValue = true, backed = true)
val useApkMirror = boolean("useApkMirror", defValue = !isAndroidTv, backed = true)
val useGitHub = boolean("useGitHub", defValue = true, backed = true)
val useFdroid = boolean("useFdroid", defValue = true, backed = true)
val useIzzy = boolean("useIzzy", defValue = true, backed = true)
Expand Down
10 changes: 9 additions & 1 deletion app/src/main/kotlin/com/apkupdater/util/Extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import android.text.Spanned
import android.text.style.ForegroundColorSpan
import android.text.style.StyleSpan
import android.text.style.UnderlineSpan
import android.util.Log
import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.ui.Modifier
Expand All @@ -22,6 +23,8 @@ import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextDecoration
import androidx.core.content.ContextCompat
import com.apkupdater.R
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
Expand Down Expand Up @@ -55,7 +58,12 @@ fun Boolean?.orFalse() = this ?: false

fun PackageInfo.name(context: Context) = applicationInfo.loadLabel(context.packageManager).toString()

fun Context.getAppIcon(packageName: String) = packageManager.getApplicationIcon(packageName)
fun Context.getAppIcon(packageName: String) = runCatching {
packageManager.getApplicationIcon(packageName)
}.getOrElse {
Log.e("getAppIcon", "App not found. Uninstalled most likely.")
ContextCompat.getDrawable(this, R.drawable.ic_root)
}

fun Context.getAppName(packageName: String): String = packageManager.getPackageInfo(packageName, 0).name(this)

Expand Down

0 comments on commit 1826b2b

Please sign in to comment.