getMimeType

fun getMimeType(file: File, fallback: String): String

Get the mimetype of the file, fallback otherwise. For more information, please refer to How to determine MIME type of file in android?