Open a file with the default application in a Kotlin Multiplatform project
.pdf
files, an image viewer for .jpg
files, or a text editor for .txt
files.
FileUriExposedException
AndroidManifest.xml
:androidMain/res/xml/file_paths.xml
:<files-path>
if you use FileKit.filesDir
<cache-path>
if you use FileKit.cacheDir
openFileSettings
parameter with your app’s FileProvider authority:FileUriExposedException
on Android 7.0 and above.