getenv("TMPDIR")
returns NULL
. Any suggestions on what is temp folder/where to create one?
Asked
Active
Viewed 1.0k times
7

Violet Giraffe
- 32,368
- 48
- 194
- 335
-
3You may want to look at http://stackoverflow.com/questions/7595324/creating-temporary-files-in-android-with-ndk , which seems to address the exact problem that you have. – Samveen Apr 26 '12 at 11:45
1 Answers
9
As far as I know there is no global /tmp in Android, you should use the cache dir.
Use getCacheDir()
to get the "tmp" dir.
http://developer.android.com/guide/topics/data/data-storage.html#filesInternal and http://developer.android.com/reference/android/content/Context.html#getCacheDir%28%29