Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {

android {
namespace 'app.myzel394.alibi'
compileSdk 34
compileSdk 35

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
Expand Down Expand Up @@ -34,9 +34,9 @@ android {
multiDexEnabled true
applicationId "app.myzel394.alibi"
minSdk 24
targetSdk 34
versionCode 16
versionName "0.5.3"
targetSdk 35
versionCode 17
versionName "0.6.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down Expand Up @@ -92,50 +92,54 @@ android {
}

dependencies {
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.core:core-ktx:1.16.0'
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0')
// Updating requires Kotlin 2.0.0 or higher
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.4'
implementation 'androidx.activity:activity-compose:1.9.1'
implementation 'androidx.activity:activity-ktx:1.9.1'
implementation platform('androidx.compose:compose-bom:2024.09.00')
implementation 'androidx.activity:activity-compose:1.10.1'
implementation 'androidx.activity:activity-ktx:1.10.1'
implementation platform('androidx.compose:compose-bom:2025.07.00')
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-graphics'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.material3:material3:1.2.1'
implementation "androidx.compose.material:material-icons-extended:1.6.8"
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.lifecycle:lifecycle-service:2.8.4'
implementation 'androidx.compose.material3:material3:1.3.2'
implementation "androidx.compose.material:material-icons-extended:1.7.8"
implementation 'androidx.appcompat:appcompat:1.7.1'
implementation 'androidx.documentfile:documentfile:1.1.0'
// Updating requires Kotlin 2.0.0 or higher
implementation 'androidx.lifecycle:lifecycle-service:2.8.7'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation platform('androidx.compose:compose-bom:2024.09.00')
androidTestImplementation platform('androidx.compose:compose-bom:2025.07.00')
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
debugImplementation 'androidx.compose.ui:ui-tooling'
debugImplementation 'androidx.compose.ui:ui-test-manifest'

implementation "androidx.navigation:navigation-compose:2.7.7"
// Updating requires Kotlin 2.0.0 or higher
implementation "androidx.navigation:navigation-compose:2.8.9"

implementation 'com.google.dagger:hilt-android:2.49'
annotationProcessor 'com.google.dagger:hilt-compiler:2.49'
implementation "androidx.hilt:hilt-navigation-compose:1.2.0"

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.1'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'

implementation 'com.arthenica:ffmpeg-kit-full-gpl:5.1'
implementation files("libs/ffmpeg-kit-full-gpl-6.0-2.LTS.aar")
implementation "com.arthenica:smart-exception-java:0.2.1"

implementation "androidx.datastore:datastore-preferences:1.1.1"

implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"
implementation "androidx.datastore:datastore-preferences:1.1.7"

// Updating requires Kotlin 2.0.0 or higher
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3"

implementation 'com.maxkeppeler.sheets-compose-dialogs:core:1.2.0'
implementation 'com.maxkeppeler.sheets-compose-dialogs:duration:1.2.0'
implementation 'com.maxkeppeler.sheets-compose-dialogs:list:1.2.0'
implementation 'com.maxkeppeler.sheets-compose-dialogs:input:1.2.0'

def camerax_version = "1.3.4"
def camerax_version = "1.4.2"
implementation "androidx.camera:camera-core:${camerax_version}"
implementation "androidx.camera:camera-camera2:${camerax_version}"
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
Expand Down
Binary file added app/libs/ffmpeg-kit-full-gpl-6.0-2.LTS.aar
Binary file not shown.
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
android:maxSdkVersion="30" />

<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />

<uses-permission android:name="android.permission.CAMERA" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class MediaConverter {
},
{},
{ statistics ->
onProgress(statistics.time)
onProgress(statistics.time.toInt())
}
)

Expand Down Expand Up @@ -171,7 +171,7 @@ class MediaConverter {
},
{},
{ statistics ->
onProgress(statistics.time)
onProgress(statistics.time.toInt())
}
)

Expand Down
36 changes: 18 additions & 18 deletions app/src/main/java/app/myzel394/alibi/ui/Navigation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.core.content.ContextCompat
import androidx.lifecycle.viewmodel.compose.viewModel
import androidx.navigation.NavDestination
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import androidx.navigation.toRoute
import app.myzel394.alibi.dataStore
import app.myzel394.alibi.ui.enums.Screen
import app.myzel394.alibi.ui.models.AudioRecorderModel
Expand Down Expand Up @@ -59,42 +61,42 @@ fun Navigation(
modifier = Modifier
.background(MaterialTheme.colorScheme.background),
navController = navController,
startDestination = if (settings.hasSeenOnboarding || DEBUG_SKIP_WELCOME) Screen.AudioRecorder.route else Screen.Welcome.route,
startDestination = if (settings.hasSeenOnboarding || DEBUG_SKIP_WELCOME) Screen.Recorder else Screen.Welcome,
) {
composable(Screen.Welcome.route) {
composable<Screen.Welcome> {
WelcomeScreen(
onNavigateToAudioRecorderScreen = {
val mainHandler = ContextCompat.getMainExecutor(context)

mainHandler.execute {
navController.navigate(Screen.AudioRecorder.route)
navController.navigate(Screen.Recorder)
}
},
)
}
composable(
Screen.AudioRecorder.route,
composable<Screen.Recorder>(
enterTransition = {
when (initialState.destination.route) {
Screen.Welcome.route -> null
else -> scaleIn(initialScale = SCALE_IN) + fadeIn()
}
// No idea how to properly check the initial destination without a string.
// Android docs suck.
if (initialState.destination.route == "app.myzel394.alibi.ui.enums.Screen.Welcome")
null
else
scaleIn(initialScale = SCALE_IN) + fadeIn()
},
exitTransition = {
scaleOut(targetScale = SCALE_IN) + fadeOut(tween(durationMillis = 150))
}
) {
RecorderScreen(
onNavigateToSettingsScreen = {
navController.navigate(Screen.Settings.route)
navController.navigate(Screen.Settings)
},
audioRecorder = audioRecorder,
videoRecorder = videoRecorder,
settings = settings,
)
}
composable(
Screen.Settings.route,
composable<Screen.Settings>(
enterTransition = {
scaleIn(initialScale = 1 / SCALE_IN) + fadeIn()
},
Expand All @@ -105,15 +107,14 @@ fun Navigation(
SettingsScreen(
onBackNavigate = navController::popBackStack,
onNavigateToCustomRecordingNotifications = {
navController.navigate(Screen.CustomRecordingNotifications.route)
navController.navigate(Screen.CustomRecordingNotifications)
},
onNavigateToAboutScreen = { navController.navigate(Screen.About.route) },
onNavigateToAboutScreen = { navController.navigate(Screen.About) },
audioRecorder = audioRecorder,
videoRecorder = videoRecorder,
)
}
composable(
Screen.CustomRecordingNotifications.route,
composable<Screen.CustomRecordingNotifications>(
enterTransition = {
slideInHorizontally(
initialOffsetX = { it -> it / 2 }
Expand All @@ -129,8 +130,7 @@ fun Navigation(
onBackNavigate = navController::popBackStack
)
}
composable(
Screen.About.route,
composable<Screen.About>(
enterTransition = {
scaleIn()
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package app.myzel394.alibi.ui.components.RecorderScreen.atoms

import android.annotation.SuppressLint
import android.content.res.Configuration
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.combinedClickable
Expand All @@ -8,6 +9,7 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
Expand All @@ -27,6 +29,7 @@ import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp

@SuppressLint("UnusedBoxWithConstraintsScope")
@OptIn(ExperimentalFoundationApi::class)
@Composable
fun BigButton(
Expand All @@ -39,7 +42,9 @@ fun BigButton(
) {
val orientation = LocalConfiguration.current.orientation

BoxWithConstraints {
BoxWithConstraints(
propagateMinConstraints = false,
) {
val isLarge = isBig
?: (maxWidth > 250.dp && maxHeight > 600.dp && orientation == Configuration.ORIENTATION_PORTRAIT)

Expand Down
26 changes: 12 additions & 14 deletions app/src/main/java/app/myzel394/alibi/ui/enums/Screen.kt
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
package app.myzel394.alibi.ui.enums

sealed class Screen(val route: String) {
data object AudioRecorder : Screen("audio-recorder")
data object Settings : Screen("settings")
data object Welcome : Screen("welcome")
data object CustomRecordingNotifications : Screen("custom-recording-notifications")
data object About : Screen("about")
import kotlinx.serialization.Serializable

fun withArgs(vararg args: String): String {
return buildString {
append(route)
args.forEach { arg ->
append("/$arg")
}
}
}
sealed class Screen {
@Serializable
data object Recorder
@Serializable
data object Settings
@Serializable
data object Welcome
@Serializable
object CustomRecordingNotifications
@Serializable
object About
}
2 changes: 1 addition & 1 deletion app/src/main/java/app/myzel394/alibi/ui/utils/file.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fun rememberFileSaverDialog(

return { it, name ->
file.value = it
launcher.launch(name ?: it.name)
launcher.launch(name.ifBlank { it.name })
}
}

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.3.0' apply false
id 'com.android.library' version '8.3.0' apply false
id 'com.android.application' version '8.10.1' apply false
id 'com.android.library' version '8.10.1' apply false
id 'org.jetbrains.kotlin.android' version '1.9.22' apply false

id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.21'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Jul 30 13:54:47 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists