You can save and read files in the internal storage as private files which only your app can see except for other apps with root privileges. The absolute path of this folder is datadata[your app package]files The class Context provides some methods which help you to make operations such as:
where at the line 5, in place of MODE_PRIVATE you can use MODE_APPEND, other constants such as MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE are deprecated.
The following code reads the same file and shows a message with the text “hello world!”
But these examples have a limitation: they can’t be used in sub folders, in other words you can’t create a tree structure of directories and files. If you need to create files in subdirectories you must use the standard technique of java, for example the following code creates a file inside the folder “sub”