How to hide media files on SD card in Android? -


i developing 1 android application, here i'm downloading media files , want keep files private application. files size large, it's not possible store in internal storage because may affect phone storage , create memory issues.

encryption , decryption of media files takes more time process. possible store files safe in external storage. files want store should not accessed applications , when connected pc should not visible.

any appreciated. in advance.

// path sdcard file sdcard = environment.getexternalstoragedirectory(); // path add new directory path file dir = new file(sdcard.getabsolutepath() + “/your-dir-name/”); // create directory if not created dir.mkdir(); // create file in write contents file file = new file(dir, “my-file-name.txt”); fileoutputstream os = outstream = new fileoutputstream(file); string data = “this content of file”; os.write(data.getbytes()); os.close(); 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -