Android saving file to external storage

后端 未结 12 863
抹茶落季
抹茶落季 2020-11-22 03:12

I have a little issue with creating a directory and saving a file to it on my android application. I\'m using this piece of code to do this :

String filename         


        
12条回答
  •  不要未来只要你来
    2020-11-22 03:49

    Probably exception is thrown because there is no MediaCard subdir. You should check if all dirs in the path exist.

    About visibility of your files: if you put file named .nomedia in your dir you are telling Android that you don't want it to scan it for media files and they will not appear in the gallery.

提交回复
热议问题