Hot answers tagged jni
It's a bit inconvenient: You have to create each array manually, along each dimension: Create an object array with size sizeX, with element type [[I (a 2D int array) At each entry of this array: Create an object array, with size sizeY, with element type [I (a 1D int array) At each entry of this array: Create an int array, with size sizeZ Here is an ...
Your package name doesn't need to match the package where you put your classes. When you write your AndroidManifest.xml you specify both the package for the game and the path to your activity. So use something like com.company.engine for your activity and your C++ and just create a new package name for the game.
Since Unity 4.2 there is a class called Androidjavaproxy which can do exactly what you are looking for. This class can implements any Java interface in Unity.
Only top voted, non community-wiki answers of a minimum length are eligible