updating commons + some minor things

This commit is contained in:
tibbi
2021-11-12 11:23:15 +01:00
parent fc1155ee72
commit d0c4369692
5 changed files with 18 additions and 15 deletions

View File

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

View File

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

View File

@@ -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" />

View File

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

View File

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