Hi guys,
The Android SDK says that the only way to share data across
applications is to use content providers. But I found that the file
created with the MODE_WORLD_WRITABLE mode could be accessed directly
by other applications, but not through content provider.
I wrote a application "test" which created a file "test.txt" in
the folder "/data/data/$AppName/files" with MODE_WORLD_WRITABLE mode.
Then I wrote another application "testFile" to write to this file:
String text = "/data/data/$AppName/files/test.txt";
FileOutputStream fos = new FileOutputStream(text );
PrintWriter pw;
pw = new PrintWriter(fos);
pw.print("I am testFile!");
pw.flush();
The second application can write the String "I am testFile!" to the
test.txt of the first application. This access is not through content
provider.
Is it a problem of Android?
Thanks,
Yi
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---