This commit is contained in:
Myzel394 2023-10-29 13:09:41 +01:00
parent 3df34b4ad0
commit 2c5665fa49
No known key found for this signature in database
GPG Key ID: 79CC92F37B3E1A2B
4 changed files with 29 additions and 44 deletions

View File

@ -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'

View File

@ -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)

View File

@ -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,

View File

@ -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 {