yaobyron / android-serialport-api

Automatically exported from code.google.com/p/android-serialport-api
0 stars 0 forks source link

change package name (android.serialport.sample) #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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