mirror of
https://github.com/SimpleMobileTools/Simple-Voice-Recorder.git
synced 2025-06-05 21:59:31 +02:00
updating commons + some minor things
This commit is contained in:
@@ -56,7 +56,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:f1ba19dcc0'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:9f9fe73d80'
|
||||
implementation 'org.greenrobot:eventbus:3.2.0'
|
||||
implementation 'com.github.Armen101:AudioRecordView:1.0.2'
|
||||
implementation 'androidx.documentfile:documentfile:1.0.1'
|
||||
|
@@ -85,6 +85,8 @@ class RecorderService : Service() {
|
||||
}
|
||||
|
||||
currFilePath = "$baseFolder/${getCurrentFormattedDateTime()}.${config.getExtensionText()}"
|
||||
|
||||
try {
|
||||
recorder = MediaRecorder().apply {
|
||||
setAudioSource(MediaRecorder.AudioSource.CAMCORDER)
|
||||
setOutputFormat(config.getOutputFormat())
|
||||
@@ -92,7 +94,6 @@ class RecorderService : Service() {
|
||||
setAudioEncodingBitRate(config.bitrate)
|
||||
setAudioSamplingRate(44100)
|
||||
|
||||
try {
|
||||
if (!isQPlus() && isPathOnSD(currFilePath)) {
|
||||
var document = getDocumentFile(currFilePath.getParentPath())
|
||||
document = document?.createFile("", currFilePath.getFilenameFromPath())
|
||||
@@ -114,12 +115,12 @@ class RecorderService : Service() {
|
||||
durationTimer.scheduleAtFixedRate(getDurationUpdateTask(), 1000, 1000)
|
||||
|
||||
startAmplitudeUpdates()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
stopRecording()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun stopRecording() {
|
||||
durationTimer.cancel()
|
||||
|
@@ -6,7 +6,7 @@
|
||||
android:width="@dimen/one_dp"
|
||||
android:color="@color/divider_grey" />
|
||||
|
||||
<corners android:radius="@dimen/normal_margin" />
|
||||
<corners android:radius="@dimen/activity_margin" />
|
||||
|
||||
<solid android:color="@color/activated_item_foreground" />
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/cab_rename"
|
||||
android:icon="@drawable/ic_rename_new"
|
||||
android:icon="@drawable/ic_rename_new_vector"
|
||||
android:title="@string/rename"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
|
@@ -3,10 +3,12 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/settings"
|
||||
android:icon="@drawable/ic_settings_cog_vector"
|
||||
android:title="@string/settings"
|
||||
app:showAsAction="never" />
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/about"
|
||||
android:icon="@drawable/ic_info_vector"
|
||||
android:title="@string/about"
|
||||
app:showAsAction="never" />
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
|
Reference in New Issue
Block a user