xiaofans / android-serialport-api

Automatically exported from code.google.com/p/android-serialport-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

change package name (android.serialport.sample)

GoogleCodeExporter opened this issue · comments

hello,

I created a new package, name it as android.prototype
after that I move all the class inside the android.serialport.sample to 
android.prototype
I change the manifest.xml as well to android.prototype

the program run well, but it always show error "Please configure your serial 
port first" even though i already did...

how to fix this problem?

thank you

Original issue reported on code.google.com by leebg...@gmail.com on 22 Jul 2011 at 10:49

If you rename the package of a class containing native methods, you have to 
rename the functions in the C++ code as well:

In class android.serialport.SerialPort, the two methods
- private native static FileDescriptor open(String path, int baudrate)
- public native void close()
are searched inside native code (SerialPort.c) with these specific names:
- Java_android_serialport_SerialPort_open(JNIEnv *env, jobject thiz, jstring 
path, jint baudrate)
- void JNICALL Java_android_serialport_SerialPort_close
  (JNIEnv *env, jobject thiz)

It is not a problem in android-serialport-api, I put the issue in "Invalid" 
state.

Original comment by cedric.p...@gmail.com on 25 Oct 2011 at 10:12

  • Changed state: Invalid