Created
February 25, 2016 08:52
-
-
Save vgonisanz/c0efd1da94f9f7deb91e to your computer and use it in GitHub Desktop.
Example in javafile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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