androidandroid-ndkc-libraries

Does Android support setjmp/longjmp, access, chdir, getcwd?


I'm pretty new to Android development and I'd like to know whether Android supports the above mentioned features which are there in C.

Thanks in advance.


Solution

  • These functions are available when coding in native C via the Android NDK. The NDK has a standard C library which includes these functions.

    If you prefer to remain in the Android Java environment, you will find that there is no concept of current working directory, so chdir() and getcwd() are obsoleted. Instead, the system makes available a set of functions for discovering internal and external storage paths (see http://developer.android.com/guide/topics/data/data-storage.html). Also typical uses of setjmp()/longjmp() can be generally covered by Java exceptions or other mechanisms.