Hi MAF experts,
I have a download function in a MAF project.
This function will download a pdf file from a http url, and save it in mobile directory.
Now I implemented it in Android mobile, but when goes to iphone, this function is failed.
I attached part of the program below which is used for checking the type of operation system, and indicate the directory for saving download file.
As you see if it is a iPhone, I will indicate the directory as "/tmp/mcs.pdf";
May I ask if the format of directory is correct or if any directory I should use for saving download file in iPhone.
if (DeviceManagerFactory.getDeviceManager().getOs().equalsIgnoreCase("IOS")==true) {
savedFilePath = "/tmp/mcs.pdf";
} else {
savedFilePath = "/sdcard/mcs.pdf";
}
FileOutputStream outfile = new FileOutputStream(savedFilePath);
outfile.write(byStream.toByteArray());
outfile.close();