diff --git a/app/build.gradle b/app/build.gradle index 4a15fd50e..b5d105696 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,6 +42,13 @@ android { vectorDrawables { useSupportLibrary true } + + configurations.all { + resolutionStrategy { + force("androidx.emoji2:emoji2-views-helper:1.3.0") + force("androidx.emoji2:emoji2:1.3.0") + } + } } signingConfigs { @@ -91,10 +98,10 @@ android { } dependencies { - implementation 'androidx.core:core-ktx:1.12.0' + implementation 'androidx.core:core-ktx:1.10.0' implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0') implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2' - implementation 'androidx.activity:activity-compose:1.8.0' + implementation 'androidx.activity:activity-compose:1.0.0' implementation platform('androidx.compose:compose-bom:2022.10.00') implementation 'androidx.compose.ui:ui' implementation 'androidx.compose.ui:ui-graphics' @@ -110,7 +117,7 @@ dependencies { debugImplementation 'androidx.compose.ui:ui-tooling' debugImplementation 'androidx.compose.ui:ui-test-manifest' - implementation "androidx.navigation:navigation-compose:2.7.4" + implementation "androidx.navigation:navigation-compose:2.5.0" implementation 'com.google.dagger:hilt-android:2.46.1' annotationProcessor 'com.google.dagger:hilt-compiler:2.46.1' diff --git a/app/src/main/java/app/myzel394/alibi/services/RecorderService.kt b/app/src/main/java/app/myzel394/alibi/services/RecorderService.kt index b5fa25bbe..b3cd09a49 100644 --- a/app/src/main/java/app/myzel394/alibi/services/RecorderService.kt +++ b/app/src/main/java/app/myzel394/alibi/services/RecorderService.kt @@ -146,16 +146,22 @@ abstract class RecorderService : Service() { fun startRecording() { recordingStart = LocalDateTime.now() - ServiceCompat.startForeground( - this, - NotificationHelper.RECORDER_CHANNEL_NOTIFICATION_ID, - getNotificationHelper().buildStartingNotification(), - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { - ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE - } else { - 0 - }, - ) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + startForeground( + NotificationHelper.RECORDER_CHANNEL_NOTIFICATION_ID, + getNotificationHelper().buildStartingNotification(), + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE + } else { + 0 + }, + ) + } else { + startForeground( + NotificationHelper.RECORDER_CHANNEL_NOTIFICATION_ID, + getNotificationHelper().buildStartingNotification(), + ) + } // Start changeState(RecorderState.RECORDING) diff --git a/app/src/main/java/app/myzel394/alibi/ui/Navigation.kt b/app/src/main/java/app/myzel394/alibi/ui/Navigation.kt index 985e79d56..f55e4acf2 100644 --- a/app/src/main/java/app/myzel394/alibi/ui/Navigation.kt +++ b/app/src/main/java/app/myzel394/alibi/ui/Navigation.kt @@ -60,15 +60,6 @@ fun Navigation( } composable( Screen.AudioRecorder.route, - enterTransition = { - when (initialState.destination.route) { - Screen.Welcome.route -> null - else -> scaleIn(initialScale = SCALE_IN) + fadeIn() - } - }, - exitTransition = { - scaleOut(targetScale = SCALE_IN) + fadeOut(tween(durationMillis = 150)) - } ) { AudioRecorderScreen( navController = navController, @@ -77,12 +68,6 @@ fun Navigation( } composable( Screen.Settings.route, - enterTransition = { - scaleIn(initialScale = 1 / SCALE_IN) + fadeIn() - }, - exitTransition = { - scaleOut(targetScale = 1 / SCALE_IN) + fadeOut(tween(durationMillis = 150)) - } ) { SettingsScreen( navController = navController, @@ -91,16 +76,6 @@ fun Navigation( } composable( Screen.CustomRecordingNotifications.route, - enterTransition = { - slideInHorizontally( - initialOffsetX = { it -> it / 2 } - ) + fadeIn() - }, - exitTransition = { - slideOutHorizontally( - targetOffsetX = { it -> it / 2 } - ) + fadeOut(tween(150)) - } ) { CustomRecordingNotificationsScreen( navController = navController, @@ -108,12 +83,6 @@ fun Navigation( } composable( Screen.About.route, - enterTransition = { - scaleIn() - }, - exitTransition = { - scaleOut() + fadeOut(tween(150)) - } ) { AboutScreen( navController = navController, diff --git a/app/src/main/java/app/myzel394/alibi/ui/utils/available-microphones.kt b/app/src/main/java/app/myzel394/alibi/ui/utils/available-microphones.kt index c36c91bf5..2a435ddd7 100644 --- a/app/src/main/java/app/myzel394/alibi/ui/utils/available-microphones.kt +++ b/app/src/main/java/app/myzel394/alibi/ui/utils/available-microphones.kt @@ -16,10 +16,13 @@ val ALLOWED_MICROPHONE_TYPES = AudioDeviceInfo.TYPE_WIRED_HEADPHONES, AudioDeviceInfo.TYPE_IP, AudioDeviceInfo.TYPE_DOCK, + /* + Currently unavailable due to targetSDK 33 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { AudioDeviceInfo.TYPE_DOCK_ANALOG } else { }, + */ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { AudioDeviceInfo.TYPE_BLE_HEADSET } else {