Book Image

Android NDK: Beginner's Guide

By : Sylvain Ratabouil
Book Image

Android NDK: Beginner's Guide

By: Sylvain Ratabouil

Overview of this book

Table of Contents (18 chapters)
Android NDK Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Passing Java primitives to native code


The simplest kinds of elements we can handle with JNI are Java primitive types. Indeed, both the Java and native side use practically the same representation for this kind of data which, does not require any specific memory management.

In this part, we will see how to pass integers to the native side and send them back to the Java side.

Note

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