You can request a specific file for the user

0

I want to get a special user file. Can you put the name of this file as type in Intent ? For an image, for example, it is used:

Intent intent = new Intent(Intent.ACTION_PICK)
intent.setType("image/*") 
startActivityForResult(intent, 1)

Is it possible to set the file name I want in setType() to show only it and the directories? The file is a "backup" of the database called "tobuy.db".

    
asked by anonymous 22.02.2018 / 23:31

1 answer

0

I was able to solve, but it was not through MIME type nor standard managers, I downloaded the library aFileDialog ( link ) and it you can send the type of extension you want to be shown, there is also how to choose a folder instead of a file, etc. The only drawback of the library is that the design is kind of ugly, but since it is open source then you can modify it.

    
24.02.2018 / 05:56