In reference to question
Can anyone explain the File() parameters used to download file in android?
Can I do it without creating virtual SD Card. Is there any way to save the file in phone memory in internal memory? if it is possible without using the virtual SD Card, then how?
your question is a bit unclear about which you want to use, so here’s both.
Like mbaird said, you can easily save a file to the phone’s internal storage using
Context.openFileOutput(). For example:This would create a new file on the phone’s internal storage, at a path like this:
/data/data/com.example.yourpackagename/files/123456.ics.Only your application can read this file; others will not be able to read this file, like they would if it was on the SD card.
If you want to save a file to the SD card, you need something like this:
As you can see, you cannot rely on an SD card being present and available for writing to at any given point in time. This could be for several reasons: