How to choose only .aar file from file manager in android

Viewed 57

How to pass the data in intent to show only .arr(firmware) file from file manager in android

val intent = Intent()
 intent.type = "*/*"
 intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, false)
 intent.action = Intent.ACTION_GET_CONTENT
 startActivityForResult(Intent.createChooser(intent, "Select Firmware File"),111)
1 Answers

afaik there is no such mime type for your extensions (not sure aar or arr), so this is not possible. you have to write own file picker or use some common library (e.g. THIS) and filter list with desired file extension (linked lib have addFileSupport method). also be aware of Scoped storage limitations

Related