send a broadcast for refreshing media at file save
This commit is contained in:
parent
aeafddd9ed
commit
91137228d2
|
@ -42,7 +42,7 @@ ext {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:3.8.0'
|
implementation 'com.simplemobiletools:commons:3.8.1'
|
||||||
|
|
||||||
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
|
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
|
||||||
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
|
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
|
||||||
|
|
|
@ -24,6 +24,7 @@ import com.simplemobiletools.camera.views.FocusRectView
|
||||||
import com.simplemobiletools.camera.views.Preview
|
import com.simplemobiletools.camera.views.Preview
|
||||||
import com.simplemobiletools.camera.views.Preview.PreviewListener
|
import com.simplemobiletools.camera.views.Preview.PreviewListener
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
|
import com.simplemobiletools.commons.helpers.BROADCAST_REFRESH_MEDIA
|
||||||
import com.simplemobiletools.commons.helpers.PERMISSION_CAMERA
|
import com.simplemobiletools.commons.helpers.PERMISSION_CAMERA
|
||||||
import com.simplemobiletools.commons.helpers.PERMISSION_RECORD_AUDIO
|
import com.simplemobiletools.commons.helpers.PERMISSION_RECORD_AUDIO
|
||||||
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||||
|
@ -564,6 +565,10 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave
|
||||||
override fun mediaSaved(path: String) {
|
override fun mediaSaved(path: String) {
|
||||||
scanPath(path) {
|
scanPath(path) {
|
||||||
setupPreviewImage(mIsInPhotoMode)
|
setupPreviewImage(mIsInPhotoMode)
|
||||||
|
Intent(BROADCAST_REFRESH_MEDIA).apply {
|
||||||
|
`package` = "com.simplemobiletools.gallery"
|
||||||
|
sendBroadcast(this)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isImageCaptureIntent()) {
|
if (isImageCaptureIntent()) {
|
||||||
|
|
Loading…
Reference in New Issue