From 978c17c7fb4f8009d3b46dc98c3d6d44242d3dc9 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Sat, 6 Jul 2024 10:00:42 +0800 Subject: [PATCH 1/5] Handle foreground/background sync on older + newer Android versions --- .../Omnivore/app/src/main/AndroidManifest.xml | 6 ++ .../feature/library/LibrarySyncWorker.kt | 87 ++++++++++--------- .../feature/save/SaveSheetActivity.kt | 11 +-- .../omnivore/feature/save/SaveURLWorker.kt | 79 +++++++++++------ 4 files changed, 106 insertions(+), 77 deletions(-) diff --git a/android/Omnivore/app/src/main/AndroidManifest.xml b/android/Omnivore/app/src/main/AndroidManifest.xml index 9d0492483..720138673 100644 --- a/android/Omnivore/app/src/main/AndroidManifest.xml +++ b/android/Omnivore/app/src/main/AndroidManifest.xml @@ -7,6 +7,8 @@ + + + diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/library/LibrarySyncWorker.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/library/LibrarySyncWorker.kt index 04fe65c34..69810c10e 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/library/LibrarySyncWorker.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/library/LibrarySyncWorker.kt @@ -4,6 +4,7 @@ import android.app.Notification import android.app.NotificationChannel import android.app.NotificationManager import android.content.Context +import android.content.pm.ServiceInfo import android.os.Build import android.util.Log import androidx.compose.ui.text.intl.Locale @@ -31,7 +32,6 @@ import java.time.Instant import java.util.TimeZone import java.util.UUID import java.util.regex.Pattern - @HiltWorker class LibrarySyncWorker @AssistedInject constructor( @Assisted appContext: Context, @@ -39,12 +39,6 @@ class LibrarySyncWorker @AssistedInject constructor( private val libraryRepository: LibraryRepository, private val datastoreRepository: DatastoreRepository, ) : CoroutineWorker(appContext, workerParams) { - override suspend fun getForegroundInfo(): ForegroundInfo { - return ForegroundInfo( - NOTIFICATION_ID, - createNotification() - ) - } companion object { const val NOTIFICATION_CHANNEL_ID = "LIBRARY_SYNC_WORKER_CHANNEL" @@ -52,64 +46,73 @@ class LibrarySyncWorker @AssistedInject constructor( const val NOTIFICATION_ID = 2 } - override suspend fun doWork(): Result { - try { - setForeground(createForegroundInfo()) - } catch (e: Exception) { - e.printStackTrace() - return Result.failure() + override suspend fun getForegroundInfo(): ForegroundInfo { + val notification = createNotification() + return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + ForegroundInfo( + NOTIFICATION_ID, + notification, + ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC + ) + } else { + ForegroundInfo(NOTIFICATION_ID, notification) } + } - return withContext(Dispatchers.IO) { + override suspend fun doWork(): Result { + return try { + // Start foreground service immediately + setForeground(getForegroundInfo()) + + withContext(Dispatchers.IO) { + performItemSync() + loadUsingSearchAPI() + Log.d("LibrarySyncWorker", "Library sync completed successfully") + Result.success() + } + } catch (e: IllegalStateException) { + Log.w("LibrarySyncWorker", "Couldn't start foreground service", e) + // Continue with the work without the foreground service try { performItemSync() loadUsingSearchAPI() + Log.d("LibrarySyncWorker", "Library sync completed without foreground service") Result.success() } catch (e: Exception) { - e.printStackTrace() + Log.e("LibrarySyncWorker", "Failed to sync library without foreground service", e) Result.failure() } + } catch (e: Exception) { + Log.e("LibrarySyncWorker", "Unexpected error in LibrarySyncWorker", e) + Result.failure() } } - private fun createForegroundInfo(): ForegroundInfo { - val notification = createNotification() - return ForegroundInfo(NOTIFICATION_ID, notification) - } - private fun createNotification(): Notification { - val channelId = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - createNotificationChannel() - } else { - "" - } + val channelId = createNotificationChannel() return NotificationCompat.Builder(applicationContext, channelId) .setContentTitle("Syncing library items") .setContentText("Your library is being synced") .setSmallIcon(R.drawable.ic_notification) - .setPriority(NotificationCompat.PRIORITY_LOW) + .setPriority(NotificationCompat.PRIORITY_HIGH) + .setCategory(NotificationCompat.CATEGORY_SERVICE) .build() } private fun createNotificationChannel(): String { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - val channelName = NOTIFICATION_CHANNEL_NAME - val channel = NotificationChannel( - NOTIFICATION_CHANNEL_ID, - channelName, - NotificationManager.IMPORTANCE_LOW - ).apply { - description = "Notification channel for library syncing" - } - - val notificationManager = applicationContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager - notificationManager.createNotificationChannel(channel) - - return NOTIFICATION_CHANNEL_ID - } else { - return "" + val channel = NotificationChannel( + NOTIFICATION_CHANNEL_ID, + NOTIFICATION_CHANNEL_NAME, + NotificationManager.IMPORTANCE_HIGH + ).apply { + description = "Notification channel for library syncing" } + + val notificationManager = applicationContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager + notificationManager.createNotificationChannel(channel) + + return NOTIFICATION_CHANNEL_ID } private suspend fun performItemSync( diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveSheetActivity.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveSheetActivity.kt index 3dcaa2c1b..4fbbed9f3 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveSheetActivity.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveSheetActivity.kt @@ -22,6 +22,7 @@ import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.unit.dp import androidx.work.Constraints import androidx.work.Data +import androidx.work.ExistingWorkPolicy import androidx.work.NetworkType import androidx.work.OneTimeWorkRequest import androidx.work.OneTimeWorkRequestBuilder @@ -137,11 +138,6 @@ class SaveSheetActivity : AppCompatActivity() { .setRequiredNetworkType(NetworkType.CONNECTED) .build() - val syncWorkerRequest = OneTimeWorkRequest.Builder(LibrarySyncWorker::class.java) - .setConstraints(constraints) - .addTag(url) - .build() - val inputData = Data.Builder() .putString("url", url) .build() @@ -153,9 +149,8 @@ class SaveSheetActivity : AppCompatActivity() { .addTag(url) .build() - beginWith(saveURLWorkRequest) - .then(syncWorkerRequest) - .enqueue() + WorkManager.getInstance(context) + .enqueueUniqueWork("saveUrl", ExistingWorkPolicy.REPLACE, saveURLWorkRequest) } @Composable diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveURLWorker.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveURLWorker.kt index 192839b1a..0d2646a4a 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveURLWorker.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveURLWorker.kt @@ -4,6 +4,7 @@ import android.app.Notification import android.app.NotificationChannel import android.app.NotificationManager import android.content.Context +import android.content.pm.ServiceInfo import android.os.Build import android.util.Log import androidx.compose.ui.text.intl.Locale @@ -34,12 +35,6 @@ class SaveURLWorker @AssistedInject constructor( @Assisted workerParams: WorkerParameters, private val datastoreRepository: DatastoreRepository, ) : CoroutineWorker(appContext, workerParams) { - override suspend fun getForegroundInfo(): ForegroundInfo { - return ForegroundInfo( - NOTIFICATION_ID, - createNotification() - ) - } companion object { const val NOTIFICATION_CHANNEL_ID = "SAVE_URL_WORKER_CHANNEL" @@ -47,17 +42,53 @@ class SaveURLWorker @AssistedInject constructor( const val NOTIFICATION_ID = 1 } - override suspend fun doWork(): Result { - try { - setForeground(createForegroundInfo()) - } catch (e: Exception) { - e.printStackTrace() - return Result.failure() + override suspend fun getForegroundInfo(): ForegroundInfo { + val notification = createNotification() + return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + ForegroundInfo( + NOTIFICATION_ID, + notification, + ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC + ) + } else { + ForegroundInfo(NOTIFICATION_ID, notification) } + } - return withContext(Dispatchers.IO) { - val url = inputData.getString("url") ?: return@withContext Result.failure() - if (saveURL(url)) Result.success() else Result.failure() + override suspend fun doWork(): Result { + return try { + // Start foreground service immediately + setForeground(getForegroundInfo()) + + withContext(Dispatchers.IO) { + val url = inputData.getString("url") + if (url == null) { + Log.e("SaveURLWorker", "No URL provided") + return@withContext Result.failure() + } + + if (saveURL(url)) { + Log.d("SaveURLWorker", "URL saved successfully") + Result.success() + } else { + Log.e("SaveURLWorker", "Failed to save URL") + Result.failure() + } + } + } catch (e: IllegalStateException) { + Log.w("SaveURLWorker", "Couldn't start foreground service", e) + // Continue with the work without the foreground service + val url = inputData.getString("url") + if (url != null && saveURL(url)) { + Log.d("SaveURLWorker", "URL saved successfully without foreground service") + Result.success() + } else { + Log.e("SaveURLWorker", "Failed to save URL without foreground service") + Result.failure() + } + } catch (e: Exception) { + Log.e("SaveURLWorker", "Unexpected error in SaveURLWorker", e) + Result.failure() } } @@ -104,11 +135,6 @@ class SaveURLWorker @AssistedInject constructor( return null } - private fun createForegroundInfo(): ForegroundInfo { - val notification = createNotification() - return ForegroundInfo(NOTIFICATION_ID, notification) - } - private fun createNotification(): Notification { val channelId = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { createNotificationChannel() @@ -120,17 +146,16 @@ class SaveURLWorker @AssistedInject constructor( .setContentTitle("Saving URL") .setContentText("Your URL is being saved in the background.") .setSmallIcon(R.drawable.ic_notification) // Ensure this icon is valid - .setPriority(NotificationCompat.PRIORITY_LOW) + .setPriority(NotificationCompat.PRIORITY_HIGH) .build() } private fun createNotificationChannel(): String { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - val channelName = NOTIFICATION_CHANNEL_NAME + return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { val channel = NotificationChannel( NOTIFICATION_CHANNEL_ID, - channelName, - NotificationManager.IMPORTANCE_LOW + NOTIFICATION_CHANNEL_NAME, + NotificationManager.IMPORTANCE_HIGH // Changed from LOW to HIGH ).apply { description = "Notification channel for URL saving" } @@ -138,9 +163,9 @@ class SaveURLWorker @AssistedInject constructor( val notificationManager = applicationContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager notificationManager.createNotificationChannel(channel) - return NOTIFICATION_CHANNEL_ID + NOTIFICATION_CHANNEL_ID } else { - return "" + "" } } } From 84664995930795e07ae6c646ec5c84df53fef1db Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Sat, 6 Jul 2024 10:12:46 +0800 Subject: [PATCH 2/5] Bump android version --- android/Omnivore/app/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/Omnivore/app/build.gradle.kts b/android/Omnivore/app/build.gradle.kts index 7a1e6ae76..0dcafd7d2 100644 --- a/android/Omnivore/app/build.gradle.kts +++ b/android/Omnivore/app/build.gradle.kts @@ -28,8 +28,8 @@ android { applicationId = "app.omnivore.omnivore" minSdk = 26 targetSdk = 34 - versionCode = 2200000 - versionName = "0.220.0" + versionCode = 2220000 + versionName = "0.222.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { From 61d66f4b51148fdc03074d91801004bc23f8046d Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Sat, 6 Jul 2024 11:14:35 +0800 Subject: [PATCH 3/5] Try to run sync in background --- .../feature/library/LibrarySyncWorker.kt | 63 +------------ .../feature/save/SaveSheetActivity.kt | 28 +++--- .../omnivore/feature/save/SaveURLWorker.kt | 89 +++---------------- 3 files changed, 28 insertions(+), 152 deletions(-) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/library/LibrarySyncWorker.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/library/LibrarySyncWorker.kt index 69810c10e..ef0f9e822 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/library/LibrarySyncWorker.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/library/LibrarySyncWorker.kt @@ -40,81 +40,20 @@ class LibrarySyncWorker @AssistedInject constructor( private val datastoreRepository: DatastoreRepository, ) : CoroutineWorker(appContext, workerParams) { - companion object { - const val NOTIFICATION_CHANNEL_ID = "LIBRARY_SYNC_WORKER_CHANNEL" - const val NOTIFICATION_CHANNEL_NAME = "Sync library" - const val NOTIFICATION_ID = 2 - } - - override suspend fun getForegroundInfo(): ForegroundInfo { - val notification = createNotification() - return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { - ForegroundInfo( - NOTIFICATION_ID, - notification, - ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC - ) - } else { - ForegroundInfo(NOTIFICATION_ID, notification) - } - } - override suspend fun doWork(): Result { return try { - // Start foreground service immediately - setForeground(getForegroundInfo()) - withContext(Dispatchers.IO) { performItemSync() loadUsingSearchAPI() Log.d("LibrarySyncWorker", "Library sync completed successfully") Result.success() } - } catch (e: IllegalStateException) { - Log.w("LibrarySyncWorker", "Couldn't start foreground service", e) - // Continue with the work without the foreground service - try { - performItemSync() - loadUsingSearchAPI() - Log.d("LibrarySyncWorker", "Library sync completed without foreground service") - Result.success() - } catch (e: Exception) { - Log.e("LibrarySyncWorker", "Failed to sync library without foreground service", e) - Result.failure() - } } catch (e: Exception) { Log.e("LibrarySyncWorker", "Unexpected error in LibrarySyncWorker", e) Result.failure() } } - private fun createNotification(): Notification { - val channelId = createNotificationChannel() - - return NotificationCompat.Builder(applicationContext, channelId) - .setContentTitle("Syncing library items") - .setContentText("Your library is being synced") - .setSmallIcon(R.drawable.ic_notification) - .setPriority(NotificationCompat.PRIORITY_HIGH) - .setCategory(NotificationCompat.CATEGORY_SERVICE) - .build() - } - - private fun createNotificationChannel(): String { - val channel = NotificationChannel( - NOTIFICATION_CHANNEL_ID, - NOTIFICATION_CHANNEL_NAME, - NotificationManager.IMPORTANCE_HIGH - ).apply { - description = "Notification channel for library syncing" - } - - val notificationManager = applicationContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager - notificationManager.createNotificationChannel(channel) - - return NOTIFICATION_CHANNEL_ID - } - private suspend fun performItemSync( cursor: String? = null, since: String = getLastSyncTime()?.toString() ?: Instant.MIN.toString(), @@ -133,7 +72,7 @@ class LibrarySyncWorker @AssistedInject constructor( if (result.hasError) { result.errorString?.let { errorString -> - println("SYNC ERROR: $errorString") + Log.e("LibrarySyncWorker", "SYNC ERROR: $errorString") } } diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveSheetActivity.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveSheetActivity.kt index 4fbbed9f3..ba480fb9f 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveSheetActivity.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveSheetActivity.kt @@ -37,6 +37,7 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.flow.collect import kotlinx.coroutines.flow.map import kotlinx.coroutines.launch +import java.util.concurrent.TimeUnit import kotlin.time.Duration.Companion.seconds import kotlin.time.toJavaDuration @@ -134,23 +135,26 @@ class SaveSheetActivity : AppCompatActivity() { } private fun WorkManager.enqueueSaveWorker(context: Context, url: String) { - val constraints = Constraints.Builder() - .setRequiredNetworkType(NetworkType.CONNECTED) + val saveData = workDataOf("url" to url) + + val saveWork = OneTimeWorkRequestBuilder() + .setInputData(saveData) + .setConstraints(Constraints.Builder() + .setRequiredNetworkType(NetworkType.CONNECTED) + .build()) .build() - val inputData = Data.Builder() - .putString("url", url) - .build() - - val saveURLWorkRequest = OneTimeWorkRequest.Builder(SaveURLWorker::class.java) - .setConstraints(constraints) - .setInputData(inputData) - .setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST) - .addTag(url) + val syncWork = OneTimeWorkRequestBuilder() + .setConstraints(Constraints.Builder() + .setRequiredNetworkType(NetworkType.CONNECTED) + .build()) + .setInitialDelay(5, TimeUnit.SECONDS) .build() WorkManager.getInstance(context) - .enqueueUniqueWork("saveUrl", ExistingWorkPolicy.REPLACE, saveURLWorkRequest) + .beginUniqueWork("saveAndSync", ExistingWorkPolicy.REPLACE, saveWork) + .then(syncWork) + .enqueue() } @Composable diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveURLWorker.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveURLWorker.kt index 0d2646a4a..027ffd5d8 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveURLWorker.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/save/SaveURLWorker.kt @@ -36,31 +36,9 @@ class SaveURLWorker @AssistedInject constructor( private val datastoreRepository: DatastoreRepository, ) : CoroutineWorker(appContext, workerParams) { - companion object { - const val NOTIFICATION_CHANNEL_ID = "SAVE_URL_WORKER_CHANNEL" - const val NOTIFICATION_CHANNEL_NAME = "URL Saver" - const val NOTIFICATION_ID = 1 - } - - override suspend fun getForegroundInfo(): ForegroundInfo { - val notification = createNotification() - return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { - ForegroundInfo( - NOTIFICATION_ID, - notification, - ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC - ) - } else { - ForegroundInfo(NOTIFICATION_ID, notification) - } - } - override suspend fun doWork(): Result { - return try { - // Start foreground service immediately - setForeground(getForegroundInfo()) - - withContext(Dispatchers.IO) { + return withContext(Dispatchers.IO) { + try { val url = inputData.getString("url") if (url == null) { Log.e("SaveURLWorker", "No URL provided") @@ -74,21 +52,10 @@ class SaveURLWorker @AssistedInject constructor( Log.e("SaveURLWorker", "Failed to save URL") Result.failure() } - } - } catch (e: IllegalStateException) { - Log.w("SaveURLWorker", "Couldn't start foreground service", e) - // Continue with the work without the foreground service - val url = inputData.getString("url") - if (url != null && saveURL(url)) { - Log.d("SaveURLWorker", "URL saved successfully without foreground service") - Result.success() - } else { - Log.e("SaveURLWorker", "Failed to save URL without foreground service") + } catch (e: Exception) { + Log.e("SaveURLWorker", "Unexpected error in SaveURLWorker", e) Result.failure() } - } catch (e: Exception) { - Log.e("SaveURLWorker", "Unexpected error in SaveURLWorker", e) - Result.failure() } } @@ -102,7 +69,7 @@ class SaveURLWorker @AssistedInject constructor( val cleanedUrl = cleanUrl(url) ?: url - try { + return try { val timezone = TimeZone.getDefault().id val locale = Locale.current.toLanguageTag() @@ -117,11 +84,10 @@ class SaveURLWorker @AssistedInject constructor( ) ) ).execute() - return (response.data?.saveUrl?.onSaveSuccess?.url != null) + (response.data?.saveUrl?.onSaveSuccess?.url != null) } catch (e: Exception) { - Log.d("omnivore", "FAILED TO SAVE ITEM") - e.printStackTrace() - return false + Log.e("SaveURLWorker", "Failed to save item", e) + false } } @@ -129,43 +95,10 @@ class SaveURLWorker @AssistedInject constructor( val pattern = Pattern.compile("\\b(?:https?|ftp)://\\S+") val matcher = pattern.matcher(text) - if (matcher.find()) { - return matcher.group() - } - return null - } - - private fun createNotification(): Notification { - val channelId = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - createNotificationChannel() + return if (matcher.find()) { + matcher.group() } else { - "" - } - - return NotificationCompat.Builder(applicationContext, channelId) - .setContentTitle("Saving URL") - .setContentText("Your URL is being saved in the background.") - .setSmallIcon(R.drawable.ic_notification) // Ensure this icon is valid - .setPriority(NotificationCompat.PRIORITY_HIGH) - .build() - } - - private fun createNotificationChannel(): String { - return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - val channel = NotificationChannel( - NOTIFICATION_CHANNEL_ID, - NOTIFICATION_CHANNEL_NAME, - NotificationManager.IMPORTANCE_HIGH // Changed from LOW to HIGH - ).apply { - description = "Notification channel for URL saving" - } - - val notificationManager = applicationContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager - notificationManager.createNotificationChannel(channel) - - NOTIFICATION_CHANNEL_ID - } else { - "" + null } } } From 2aebc1c2888d6c496e3798e591a4e3d44052b17b Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Sat, 6 Jul 2024 11:25:49 +0800 Subject: [PATCH 4/5] Bump version --- android/Omnivore/app/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/Omnivore/app/build.gradle.kts b/android/Omnivore/app/build.gradle.kts index 0dcafd7d2..b71db5f61 100644 --- a/android/Omnivore/app/build.gradle.kts +++ b/android/Omnivore/app/build.gradle.kts @@ -28,8 +28,8 @@ android { applicationId = "app.omnivore.omnivore" minSdk = 26 targetSdk = 34 - versionCode = 2220000 - versionName = "0.222.0" + versionCode = 2240000 + versionName = "0.224.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { From e3ae94513a26c52e1df47d3f6e83622ce34f7733 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Sat, 6 Jul 2024 11:58:00 +0800 Subject: [PATCH 5/5] Remove unneeded permissions --- android/Omnivore/app/build.gradle.kts | 4 ++-- android/Omnivore/app/src/main/AndroidManifest.xml | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/android/Omnivore/app/build.gradle.kts b/android/Omnivore/app/build.gradle.kts index b71db5f61..f07338946 100644 --- a/android/Omnivore/app/build.gradle.kts +++ b/android/Omnivore/app/build.gradle.kts @@ -28,8 +28,8 @@ android { applicationId = "app.omnivore.omnivore" minSdk = 26 targetSdk = 34 - versionCode = 2240000 - versionName = "0.224.0" + versionCode = 2260000 + versionName = "0.226.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { diff --git a/android/Omnivore/app/src/main/AndroidManifest.xml b/android/Omnivore/app/src/main/AndroidManifest.xml index 720138673..c5bb107e6 100644 --- a/android/Omnivore/app/src/main/AndroidManifest.xml +++ b/android/Omnivore/app/src/main/AndroidManifest.xml @@ -6,9 +6,6 @@ - - - - -