mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
use the default file mimetype at sharing a file
This commit is contained in:
parent
eb2ff336ce
commit
71051fe928
2 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.simplemobiletools:commons:2.13.7'
|
compile 'com.simplemobiletools:commons:2.14.1'
|
||||||
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
|
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
|
||||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||||
compile 'com.google.code.gson:gson:2.8.0'
|
compile 'com.google.code.gson:gson:2.8.0'
|
||||||
|
|
|
@ -85,7 +85,7 @@ fun Activity.openWith(file: File, forceChooser: Boolean = true) {
|
||||||
val uri = Uri.fromFile(file)
|
val uri = Uri.fromFile(file)
|
||||||
Intent().apply {
|
Intent().apply {
|
||||||
action = Intent.ACTION_VIEW
|
action = Intent.ACTION_VIEW
|
||||||
setDataAndType(uri, file.getMimeType("image/jpeg"))
|
setDataAndType(uri, file.getMimeType())
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||||
val chooser = Intent.createChooser(this, getString(R.string.open_with))
|
val chooser = Intent.createChooser(this, getString(R.string.open_with))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue