From 90aefb73c567ce44ad5c9109134a0bd19c772a64 Mon Sep 17 00:00:00 2001 From: khainhero <42075898+khainhero@users.noreply.github.com> Date: Tue, 14 Apr 2020 19:31:55 -0400 Subject: [PATCH 1/3] Update build.gradle compileSdkVersion 28 -> compileSdkVersion 29 --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index b44799e4..9fc57383 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 28 + compileSdkVersion 29 sourceSets { main.java.srcDirs += 'src/main/kotlin' From ec81404cde905f32656df0fd7765ebd6ed5fde22 Mon Sep 17 00:00:00 2001 From: khainhero <42075898+khainhero@users.noreply.github.com> Date: Tue, 14 Apr 2020 19:33:38 -0400 Subject: [PATCH 2/3] Update VideoCompressPlugin.kt added "this." for calling the context to get externalFileDir needed for sdk version 29 i assume --- .../kotlin/com/example/video_compress/VideoCompressPlugin.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/kotlin/com/example/video_compress/VideoCompressPlugin.kt b/android/src/main/kotlin/com/example/video_compress/VideoCompressPlugin.kt index 94118fe3..70ccd95e 100644 --- a/android/src/main/kotlin/com/example/video_compress/VideoCompressPlugin.kt +++ b/android/src/main/kotlin/com/example/video_compress/VideoCompressPlugin.kt @@ -57,7 +57,7 @@ class VideoCompressPlugin private constructor(private val activity: Activity, pr val includeAudio = call.argument("includeAudio") val frameRate = if (call.argument("frameRate")==null) 30 else call.argument("frameRate") - val tempDir: String = context.getExternalFilesDir("video_compress").absolutePath + val tempDir: String = this.context.getExternalFilesDir("video_compress").absolutePath val out = SimpleDateFormat("yyyy-MM-dd hh-mm-ss").format(Date()) val destPath: String = tempDir + File.separator + "VID_" + out + ".mp4" @@ -129,4 +129,4 @@ class VideoCompressPlugin private constructor(private val activity: Activity, pr } } -} \ No newline at end of file +} From d9968919527922307c49a82084ad8baefa1ce702 Mon Sep 17 00:00:00 2001 From: khainhero <42075898+khainhero@users.noreply.github.com> Date: Tue, 14 Apr 2020 22:09:30 -0400 Subject: [PATCH 3/3] Update VideoCompressPlugin.kt added check for null --- .../kotlin/com/example/video_compress/VideoCompressPlugin.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/kotlin/com/example/video_compress/VideoCompressPlugin.kt b/android/src/main/kotlin/com/example/video_compress/VideoCompressPlugin.kt index 70ccd95e..e7c53248 100644 --- a/android/src/main/kotlin/com/example/video_compress/VideoCompressPlugin.kt +++ b/android/src/main/kotlin/com/example/video_compress/VideoCompressPlugin.kt @@ -57,7 +57,7 @@ class VideoCompressPlugin private constructor(private val activity: Activity, pr val includeAudio = call.argument("includeAudio") val frameRate = if (call.argument("frameRate")==null) 30 else call.argument("frameRate") - val tempDir: String = this.context.getExternalFilesDir("video_compress").absolutePath + val tempDir: String = this.context.getExternalFilesDir("video_compress")!!.absolutePath val out = SimpleDateFormat("yyyy-MM-dd hh-mm-ss").format(Date()) val destPath: String = tempDir + File.separator + "VID_" + out + ".mp4"