Skip to content

Commit

Permalink
fix: Decreasing version because of https://issuetracker.google.com/is…
Browse files Browse the repository at this point in the history
  • Loading branch information
Myzel394 committed Oct 29, 2023
1 parent 3df34b4 commit 2c5665f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 44 deletions.
13 changes: 10 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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'
Expand All @@ -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'
Expand Down
26 changes: 16 additions & 10 deletions app/src/main/java/app/myzel394/alibi/services/RecorderService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
31 changes: 0 additions & 31 deletions app/src/main/java/app/myzel394/alibi/ui/Navigation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -91,29 +76,13 @@ 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,
)
}
composable(
Screen.About.route,
enterTransition = {
scaleIn()
},
exitTransition = {
scaleOut() + fadeOut(tween(150))
}
) {
AboutScreen(
navController = navController,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2c5665f

Please sign in to comment.