Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example in javafile
// Java package
package com.github.vgoni;
// Imports
import android.util.Log;
public final class InterfaceToCJNI
{
// Load Native C/C++ Libraries
// =========================================================================
static
{
try
{
Log.v("InterfaceToCJNI", "Loading cpplibrary.so");
System.loadLibrary("cpplibrary");
}
catch (UnsatisfiedLinkError use)
{
Log.e("InterfaceToCJNI", "WARNING: Could not load cpplibrary");
Log.e("InterfaceToCJNI", use.getMessage());
}
}
// Static native functions
// =========================================================================
public static native void start(String sessionID);
public static native void update(String data);
public static native void shutdown(int signal);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment