Skip to content

Commit

Permalink
Fix audio recording issue in android v10 or less
Browse files Browse the repository at this point in the history
  • Loading branch information
atick-faisal committed Aug 7, 2023
1 parent 26d584b commit bb51646
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import androidx.compose.ui.viewinterop.AndroidView
import com.airbnb.lottie.LottieAnimationView
import dev.atick.compose.R
import java.io.File
import java.nio.file.Files
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
Expand All @@ -43,9 +42,7 @@ fun AudioRecordDialog(
}

val timestamp = SimpleDateFormat("dd_M_yyyy_hh_mm_ss", Locale.US).format(Date())
val savePath =
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)
Files.createDirectories(savePath.toPath())
val savePath = context.getExternalFilesDir(Environment.DIRECTORY_MUSIC)
val myExternalFile = File(savePath, "cardiac_zone_${timestamp}.mp3")

recorder.apply {
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ buildscript {
compile_sdk_version = 33
min_sdk_version = 26
target_sdk_version = 33
version_code = 40
version_name = "3.3.0"
version_code = 41
version_name = "3.3.1"

agp_version = "8.1.0"
kotlin_version = "1.9.0"
Expand Down

0 comments on commit bb51646

Please sign in to comment.