There are two published applications both use the same method to write a file that is the basis for an in app profile. I would like to create a central point where the user can read their aggregated profile information. What is the directory I should be trying to access to get at these files to read them in my new app? Is this even possible or should I make these two apps use sqlite w/ a content provider? or some other method?
I've read the fos documentation but only certain methods provide a path while the one in question does not
I'm not really sure how to approach this. Thanks for the direction.
Here is the write method:
public void write(Context ctx){
try {
FileOutputStream fos;
fos = ctx.openFileOutput("profile", Context.MODE_WORLD_READABLE);
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(profile);
oos.close();
fos.close();
} catch (IOException e) {
e.printStackTrace();
Toast.makeText(ctx, "Error: Writing to file",
Toast.LENGTH_SHORT).show();
}
}