Skip to content

Commit

Permalink
VideoIssueSoved
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronil Gwalani committed Oct 17, 2023
1 parent f0b5c1c commit 01afba0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CMImagePicker(
return this
}

fun allowgalleryOnly(galleryOnly: Boolean): CMImagePicker {
fun allowGalleryOnly(galleryOnly: Boolean): CMImagePicker {
this.galleryOnly = galleryOnly
return this
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ class ImagePickerMainActivity : AppCompatActivity() {
}

private fun openGallery() {
val intent = Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI)
val intent = Intent(Intent.ACTION_PICK)
intent.type = "image/*"
galleryLauncher.launch(intent)
}

Expand Down Expand Up @@ -313,7 +314,11 @@ class ImagePickerMainActivity : AppCompatActivity() {
setResultAndFinish(imagePath, imageFile, resultIntent)
}
} else {
Toast.makeText(this, getString(R.string.some_error_occur_try_again), Toast.LENGTH_SHORT).show()
Toast.makeText(
this,
getString(R.string.some_error_occur_try_again),
Toast.LENGTH_SHORT
).show()
dialog.dismiss()
finish()
}
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
applicationId "com.tcm.imagepicker.project"
minSdk 21
targetSdk 34
versionCode 1
versionName "1.0.0"
versionCode 2
versionName "1.0.2"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down

0 comments on commit 01afba0

Please sign in to comment.