Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #if __ANDROID__
  2. #include <jni.h>
  3. JNIEXPORT jbyteArray JNICALL
  4. Java_com_my_company_TestClass_process(JNIEnv *env, jobject thiz, jbyteArray command);
  5. #endif
  6. #endif
  7.  
  8. apply plugin: 'com.android.library'
  9. android {
  10. ...
  11. sourceSets.main {
  12. jniLibs.srcDir 'src/main/jniLibs'
  13. }
  14. }
  15.  
  16. public class TestClass
  17. {
  18. public native byte[] process(byte[] command);
  19.  
  20. static
  21. {
  22. System.loadLibrary("nativelib");
  23. }
  24. ...
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement