March 2013
Intermediate to advanced
346 pages
8h 4m
English
JNI functions can fail because of system constraint (for example, lack of memory) or invalid arguments (for example, passing a native UTF-8 string when the function is expecting a UTF-16 string). This recipe discusses how to handle errors and exceptions in JNI programming.
The following recipes should be read first before proceeding with this recipe:
Follow these steps to create a sample Android project that illustrates errors and exception handling in JNI:
ExceptionHandling. Set the package ...