Good morning,
i am a little confused on the concept of reading/writing files to an android device. Firstly i get a byte[] object from a web service, i want to save it to a file with name.doc, if it is a doc file, i know what file i am getting each time from the web service. Were do i save this file so i can then open it from an intent to wordtogo fror example? if the device does not have a sdcard were do i save it. i use this code below for saving the file to data/data/apk name/files but when it executes the open file commands it says permission denied.
any help please? i can see that the files are created in the directory /data/data/package/files/ but when i try to open them adobe reader or/and word to go displays a message 'permission denies'. is there a fallback to save files that can be opened through other apps(adobe reader) from my app?
If I recall correctly, files stored in the apps data directory are accessible by that app only. You would have to store the file in a globally accessible location, such as on an SD card, to enable other apps to read it.
what uri do i use to save to sdcard? is it like /sdcard/myfile.pdf ? and what if the device doesnt have an sdcard? where can i save the files so i can then open them with adobe reader within my appplication.
thanks again.