Other use cases

Platform library

To link against a platform library,
use the following instructions:

Find the desired library in the Android NDK Native APIs
list in the Android docs. This lists stable native APIs.

Load the library using DynamicLibrary.open.
For example, to load OpenGL ES (v3):

    
DynamicLibrary.open('libGLES_v3.so');

You might need to update the Android manifest
file of the app or plugin if indicated by
the documentation.

First-party library

The process for including native code in source
code or binary form is the same for an app or
plugin.

Open-source third-party

Follow the Add C and C++ code to your project
instructions in the Android docs to
add native code and support for the native
code toolchain (either CMake or ndk-build).

Closed-source third-party library