mirror of
https://github.com/SimpleMobileTools/Simple-Voice-Recorder.git
synced 2025-06-05 21:59:31 +02:00
updating commons
This commit is contained in:
@@ -63,7 +63,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:4c83ec8740'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:42733f39a4'
|
||||||
implementation 'org.greenrobot:eventbus:3.3.1'
|
implementation 'org.greenrobot:eventbus:3.3.1'
|
||||||
implementation 'com.github.Armen101:AudioRecordView:1.0.4'
|
implementation 'com.github.Armen101:AudioRecordView:1.0.4'
|
||||||
implementation 'androidx.documentfile:documentfile:1.0.1'
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
||||||
|
@@ -2,6 +2,7 @@ package com.simplemobiletools.voicerecorder.activities
|
|||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import com.simplemobiletools.commons.dialogs.PermissionRequiredDialog
|
import com.simplemobiletools.commons.dialogs.PermissionRequiredDialog
|
||||||
|
import com.simplemobiletools.commons.extensions.openNotificationSettings
|
||||||
import com.simplemobiletools.voicerecorder.R
|
import com.simplemobiletools.voicerecorder.R
|
||||||
import com.simplemobiletools.voicerecorder.services.RecorderService
|
import com.simplemobiletools.voicerecorder.services.RecorderService
|
||||||
|
|
||||||
@@ -26,7 +27,7 @@ class BackgroundRecordActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
PermissionRequiredDialog(this, R.string.allow_notifications_voice_recorder)
|
PermissionRequiredDialog(this, R.string.allow_notifications_voice_recorder, { openNotificationSettings() })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -14,11 +14,15 @@ import com.simplemobiletools.voicerecorder.R
|
|||||||
import com.simplemobiletools.voicerecorder.helpers.*
|
import com.simplemobiletools.voicerecorder.helpers.*
|
||||||
import com.simplemobiletools.voicerecorder.models.Events
|
import com.simplemobiletools.voicerecorder.models.Events
|
||||||
import com.simplemobiletools.voicerecorder.services.RecorderService
|
import com.simplemobiletools.voicerecorder.services.RecorderService
|
||||||
import kotlinx.android.synthetic.main.fragment_recorder.view.*
|
import kotlinx.android.synthetic.main.fragment_recorder.view.recorder_visualizer
|
||||||
|
import kotlinx.android.synthetic.main.fragment_recorder.view.recording_duration
|
||||||
|
import kotlinx.android.synthetic.main.fragment_recorder.view.toggle_pause_button
|
||||||
|
import kotlinx.android.synthetic.main.fragment_recorder.view.toggle_recording_button
|
||||||
import org.greenrobot.eventbus.EventBus
|
import org.greenrobot.eventbus.EventBus
|
||||||
import org.greenrobot.eventbus.Subscribe
|
import org.greenrobot.eventbus.Subscribe
|
||||||
import org.greenrobot.eventbus.ThreadMode
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
import java.util.*
|
import java.util.Timer
|
||||||
|
import java.util.TimerTask
|
||||||
|
|
||||||
class RecorderFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerFragment(context, attributeSet) {
|
class RecorderFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerFragment(context, attributeSet) {
|
||||||
private var status = RECORDING_STOPPED
|
private var status = RECORDING_STOPPED
|
||||||
@@ -52,7 +56,9 @@ class RecorderFragment(context: Context, attributeSet: AttributeSet) : MyViewPag
|
|||||||
if (granted) {
|
if (granted) {
|
||||||
toggleRecording()
|
toggleRecording()
|
||||||
} else {
|
} else {
|
||||||
PermissionRequiredDialog(context as BaseSimpleActivity, R.string.allow_notifications_voice_recorder)
|
PermissionRequiredDialog(context as BaseSimpleActivity, R.string.allow_notifications_voice_recorder, {
|
||||||
|
(context as BaseSimpleActivity).openNotificationSettings()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user