user3465277
user3465277

Reputation: 219

Hidding files in sdcard

I have created a .wav file and i storage it like this

            File file =new File(outputfile);

    outputfile = Environment.getExternalStorageDirectory()+"/MyImages/audio1.wav";

When i am opening my AudioPlayer i have this file with my music what is really bad for me.

I want to hide this file to not be visible for me in AudioPlayer.

I tried to save this file using SharedPreferences but i cant save bytearrays. Ofc i can try:

                  String encodedImage = Base64.encodeToString(audioBytes, Base64.DEFAULT);

and then:

                    byte[] b = Base64.decode(audiodata1, Base64.DEFAULT);

But then i dont rly know to play sound from this file just using bytes.

Upvotes: 0

Views: 45

Answers (1)

Yakiv Mospan
Yakiv Mospan

Reputation: 8224

To make the file hidden just put the dot as prefix of your file name .audio1.wav:

outputfile = Environment.getExternalStorageDirectory()+"/MyImages/.audio1.wav";

Upvotes: 3

Related Questions