Convert String to Uri in Kotlin
val uri = Uri.parse(Uri_string)
or
val fileName = "example.jpg"
val path = "${Environment.getExternalStorageDirectory()}/$fileName"
val file = File(path);
val uri = Uri.fromFile(file);
val uri = Uri.parse(Uri_string)
or
val fileName = "example.jpg"
val path = "${Environment.getExternalStorageDirectory()}/$fileName"
val file = File(path);
val uri = Uri.fromFile(file);