In my application, I save the XML file on the user's SD card by doing File newxmlfile = new File(Environment.getExternalStorageDirectory() + "/Message.xml");
But not all users have SD cards in their phone, and so my application is likely to crash.
How do I change the way I create a file to save the file to my phone instead of the SD card?
Also, how do I change the file upload? (at present time new InputSource(new FileInputStream(Environment.getExternalStorageDirectory() + "/Message.xml")))
EDIT: I don't think you have a question correctly. I know the data storage page in Docs for Android, and I read it. I just want to know how I can configure it to fit my current way of saving and loading a file.
source
share