Skip to content

Commit

Permalink
android scope storage change 29->30
Browse files Browse the repository at this point in the history
  • Loading branch information
lwj1994 committed Apr 2, 2023
1 parent e3c5ba6 commit 7617144
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ class ImageGallerySaverPlugin : FlutterPlugin, MethodCallHandler {
val quality = call.argument<Int>("quality") ?: return
val name = call.argument<String>("name")
val folder = call.argument<String>("folder")
if (Build.VERSION.SDK_INT >= 29) {
if (Build.VERSION.SDK_INT >= 30) {
result.success(
saveImageToGallery29(
saveImageToGallery30(
applicationContext!!,
BitmapFactory.decodeByteArray(image, 0, image.size),
name ?: "",
Expand All @@ -64,9 +64,9 @@ class ImageGallerySaverPlugin : FlutterPlugin, MethodCallHandler {
val name = call.argument<String>("name")
val folder = call.argument<String>("folder")

if (Build.VERSION.SDK_INT >= 29) {
if (Build.VERSION.SDK_INT >= 30) {
result.success(
saveFileToGallery29(
saveFileToGallery30(
applicationContext!!,
path,
name ?: "",
Expand Down Expand Up @@ -152,7 +152,7 @@ class ImageGallerySaverPlugin : FlutterPlugin, MethodCallHandler {
* android 10 以上版本
*/
@TargetApi(Build.VERSION_CODES.Q)
fun saveImageToGallery29(
fun saveImageToGallery30(
context: Context,
image: Bitmap,
name: String?,
Expand Down Expand Up @@ -206,7 +206,7 @@ class ImageGallerySaverPlugin : FlutterPlugin, MethodCallHandler {
}

@TargetApi(Build.VERSION_CODES.Q)
private fun saveFileToGallery29(
private fun saveFileToGallery30(
context: Context,
filePath: String,
name: String,
Expand Down

0 comments on commit 7617144

Please sign in to comment.