silverburgh wrote:
> I create a local file in my activity like this:
>
> File f = getFileStreamPath("mypicture");
>
> How can I pass the URI of this file to another Activity?
If the other activity is one in your application, just tell it the path
from the File object, or the relative path you started with.
If the other activity is outside your application, you can use
File#getAbsolutePath() to get the fully-qualified path.
> And do I need to set any permission (file permission, manifest
> permission) to allow other Activity to use that file?
You can try MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE with
openFileOutput() when you create the file, but I have not tried these.
By default, other applications cannot access your file in your app-local
file storage area.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy
Need help for your Android OSS project? http://wiki.andmob.org/hado
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---