updating commons
This commit is contained in:
parent
4d01b6d4a0
commit
bc07f3c9fe
3 changed files with 12 additions and 5 deletions
|
@ -63,7 +63,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:4c83ec8740'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:42733f39a4'
|
||||
implementation 'org.greenrobot:eventbus:3.3.1'
|
||||
implementation 'com.github.Armen101:AudioRecordView:1.0.4'
|
||||
implementation 'androidx.documentfile:documentfile:1.0.1'
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.simplemobiletools.voicerecorder.activities
|
|||
|
||||
import android.content.Intent
|
||||
import com.simplemobiletools.commons.dialogs.PermissionRequiredDialog
|
||||
import com.simplemobiletools.commons.extensions.openNotificationSettings
|
||||
import com.simplemobiletools.voicerecorder.R
|
||||
import com.simplemobiletools.voicerecorder.services.RecorderService
|
||||
|
||||
|
@ -26,7 +27,7 @@ class BackgroundRecordActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
} 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.models.Events
|
||||
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.Subscribe
|
||||
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) {
|
||||
private var status = RECORDING_STOPPED
|
||||
|
@ -52,7 +56,9 @@ class RecorderFragment(context: Context, attributeSet: AttributeSet) : MyViewPag
|
|||
if (granted) {
|
||||
toggleRecording()
|
||||
} 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()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue