Bashir Coder
Bashir Coder

Reputation: 13

How to store an audio recording into internal storage in android

I did this in external storage but can't figure it out when it comes to the internal storage of android phone.

Upvotes: 1

Views: 1419

Answers (2)

Deepak Jangir
Deepak Jangir

Reputation: 590

Use App Storage Directory using getFilesDir() as:

SDCardpath = getFilesDir();
        myDataPath = new File(SDCardpath.getAbsolutePath()
                + "/.My Recordings");

        // mydir = context.getDir("media", Context.MODE_PRIVATE);
        if (!myDataPath.exists())
            myDataPath.mkdir();


        audiofile = new File(myDataPath + "/" + fileName);

Upvotes: 1

Kent Hawkings
Kent Hawkings

Reputation: 2793

The Android Developer guide contains a section on using internal storage. You can find it here.

Upvotes: 0

Related Questions