Updated to API 36 (Android 16), bumped dependencies

This commit is contained in:
Arty Bishop committed 2025-12-27 15:01:47 +00:00
1 parent bffb4842b1
commit aa9365b2fd
11 files changed
+48 -47

No files matched your search

@@ -50,7 +50,7 @@ class DatabaseRepo(
val importedRadios = mutableListOf<SatRadio>()
// fetch
val jobsMap = Sources.satelliteDataUrls.mapValues { async { remoteSource.getNetworkStream(it.value) } }
val jobRadios = async { remoteSource.getNetworkStream(Sources.radioDataUrl) }
val jobRadios = async { remoteSource.getNetworkStream(Sources.RADIO_DATA_URL) }
// parse
jobsMap.mapValues { job -> job.value.await() }.forEach { entry ->
entry.value?.let { stream ->
@@ -18,13 +18,13 @@
package com.rtbishop.look4sat.data.source
import android.content.ContentResolver
import android.net.Uri
import com.rtbishop.look4sat.domain.source.IRemoteSource
import java.io.InputStream
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.withContext
import okhttp3.OkHttpClient
import okhttp3.Request
import androidx.core.net.toUri
class RemoteSource(
private val dispatcher: CoroutineDispatcher,
@@ -34,7 +34,7 @@ class RemoteSource(
override suspend fun getFileStream(uri: String): InputStream? = withContext(dispatcher) {
try {
val fileUri = Uri.parse(uri)
val fileUri = uri.toUri()
contentResolver.openInputStream(fileUri)
} catch (exception: Exception) {
println("RemoteSource file stream exception: $exception")
@@ -3,13 +3,13 @@ package com.rtbishop.look4sat.data.usecase
import android.content.ActivityNotFoundException
import android.content.Context
import android.content.Intent
import android.net.Uri
import com.rtbishop.look4sat.domain.usecase.IOpenWebUrl
import androidx.core.net.toUri
class OpenWebUrl(private val context: Context) : IOpenWebUrl {
override fun invoke(url: String) {
try {
context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)).apply {
context.startActivity(Intent(Intent.ACTION_VIEW, url.toUri()).apply {
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
})
} catch (_: ActivityNotFoundException) {