如何在jetpack compose中的activity result launcher中设置多个mime类型。
val documentPickerLauncher = rememberLauncherForActivityResult(contract = contracts,
onResult = {
// performing operations with selected file.
})
val scope = rememberCoroutineScope()
scope.launch {
// launching the file picker
launcher.launch("*/*")
}
Here i can select all files in the storage. Instead of all files, i need to restrict this into png and pdf. How to acheive this?
字符串
2条答案
按热度按时间axr492tv1#
您需要将MIME类型添加到Intent:
字符串
我不能100%确定那些MIME类型是否正确
pexxcrt22#
字符串