views:

254

answers:

1

How do I create a shared directory with read/write permissions to all applications installed on my phone and that is not on the sdcard? I tried that :

File f = new File("/tmp"); f.mkdir();

but it is not working.

+2  A: 

The preferred way in Android would be to use ContentProvider.

A ContentProvider will be able to write File blobs.

See http://developer.android.com/guide/topics/providers/content-providers.html http://developer.android.com/reference/android/content/ContentProvider.html

dparnas
Do you have an example ?
Arutha
sorry, haven't found any good examples. http://www.techjini.com/blog/2009/01/10/android-tip-1-contentprovider-accessing-local-file-system-from-webview-showing-image-in-webview-using-content/ will cover some aspects though
dparnas