How to get the path to the temp folder from native code on Android?

getenv("TMPDIR") returns NULL . Any suggestions on what a temporary folder is / where to create it?

+6
source share
1 answer

As far as I know, there is no global / tmp in Android, you should use a cache .

Use getCacheDir() to get the tmp directory .

http://developer.android.com/guide/topics/data/data-storage.html#filesInternal and http://developer.android.com/reference/android/content/Context.html#getCacheDir%28%29

+7
source

Source: https://habr.com/ru/post/914213/


All Articles