安卓层代码:
package com.demouhf.uhfjni;import android.util.Log;
class Foo {protected int len;protected String name;
}
public class Demouhf {static {try {Log.i("JNI", "wqf Trying to load libnhf.so");/* 調用gsensor.so */System.loadLibrary("jni_nhf"); }catch (UnsatisfiedLinkError ule) {Log.e("JNI", "wqf WARNING: Could not load libnhf.so");}}//public static native int as3992_get_version(Reader_Version_Info *readerinfo);public static native int openport(String port,int baud,char parity, int databits, int stopbits);public static native int closeport();public static native String getversion();public static native String inventory();public static native int select(int[] epc);public static native int stopinventory();//public static native int openport();public static native int open();public stat