Hi,
how i can use this code in my progrect?
package com.jhxd.serial;
import android.R.integer;
import android.util.Log;
public class serialService {
static{
try {
System.loadLibrary("serial_jni");
} catch (UnsatisfiedLinkError ule) {
System.err.println("WARNING: Could not load serial_jni library!");
}
}
public static native int serialOpen(String ttyportString);
public static native int serialSetbaud(int fd,int baud);
public static native int serialRead(int fd,byte[] data,int readlen);
public static native int serialWrite(int fd,byte[] data,int writelen);
public static native int serialClose(int fd);
}
how i can use this code in my progrect?
package com.jhxd.serial;
import android.R.integer;
import android.util.Log;
public class serialService {
static{
try {
System.loadLibrary("serial_jni");
} catch (UnsatisfiedLinkError ule) {
System.err.println("WARNING: Could not load serial_jni library!");
}
}
public static native int serialOpen(String ttyportString);
public static native int serialSetbaud(int fd,int baud);
public static native int serialRead(int fd,byte[] data,int readlen);
public static native int serialWrite(int fd,byte[] data,int writelen);
public static native int serialClose(int fd);
}