Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a shared directory with read and write access to all applications in Android?

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.

like image 831
Arutha Avatar asked Nov 06 '22 16:11

Arutha


1 Answers

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

like image 174
dparnas Avatar answered Nov 12 '22 15:11

dparnas