Managing Java arrays

There is one last type of data we have not talked about yet: arrays. Arrays have a specific place in Java as well as in JNI. They have their proper types and APIs, although Java arrays are also objects at their root.

In this part, we will improve our store by letting users enter a set of values simultaneously in an entry. This set is going to be communicated to the native store as a Java array, which in turn is going to be stored as a classic C array.

Note

The resulting project is provided with this book under the name Store_Part8.

Get Android NDK Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.