diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-23 14:05:50 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-07-23 14:05:50 -0700 |
commit | 9d66cd0542aa3adbeab59ede68ceeaf96f103a42 (patch) | |
tree | 548230036b0c3aa44cf469155429e818819bddfb | |
parent | e83daab96c8e9ed02581094e50b7da2e043ee6eb (diff) | |
download | frost-9d66cd0542aa3adbeab59ede68ceeaf96f103a42.tar.gz frost-9d66cd0542aa3adbeab59ede68ceeaf96f103a42.tar.bz2 frost-9d66cd0542aa3adbeab59ede68ceeaf96f103a42.zip |
Update file chooser
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/contracts/FileChooser.kt | 4 | ||||
-rw-r--r-- | gradle.properties | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/contracts/FileChooser.kt b/app/src/main/kotlin/com/pitchedapps/frost/contracts/FileChooser.kt index 3a5b34ac..bd31d6ce 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/contracts/FileChooser.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/contracts/FileChooser.kt @@ -9,6 +9,7 @@ import ca.allanwang.kau.imagepicker.kauLaunchImagePicker import ca.allanwang.kau.imagepicker.kauOnImagePickerResult import com.pitchedapps.frost.activities.ImagePickerActivity import com.pitchedapps.frost.utils.L +import java.io.File /** * Created by Allan Wang on 2017-07-04. @@ -37,8 +38,9 @@ class FileChooserDelegate : FileChooserContract { override fun Activity.onActivityResultWeb(requestCode: Int, resultCode: Int, intent: Intent?): Boolean { L.d("FileChooser On activity results web $requestCode") if (requestCode != IMAGE_CHOOSER_REQUEST) return false - val results = kauOnImagePickerResult(resultCode, intent).map { Uri.parse(it.data) }.toTypedArray() + val results = kauOnImagePickerResult(resultCode, intent).map { it.uri }.toTypedArray() L.d("FileChooser result ${results.contentToString()}") + //proper path content://com.android.providers.media.documents/document/image%3A36341 L.d("FileChooser Callback received; ${filePathCallback != null}") filePathCallback?.onReceiveValue(results) filePathCallback = null diff --git a/gradle.properties b/gradle.properties index 6adf24e1..90528a7e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,7 +17,7 @@ MIN_SDK=21 TARGET_SDK=26 BUILD_TOOLS=26.0.0 -KAU=3.1.0 +KAU=9677dce KOTLIN=1.1.3-2 CRASHLYTICS=2.6.8 DBFLOW=4.0.5 |