I'm new to Android and I use eclipse. I'm making an application with bluetooth on my Android phone and the version is 2.3. I use the example downloaded from the SDK manager and changes so it will work for me. In the example file "BluetoothServiceChat" they call the function public synchronized void stop().
Now Eclipse throws an error and it says "Cannot override the final method from Thread". What can I do to fix this?
I use the explanation about the code from here
Example code of the stop function:
/**
* Stop all threads
*/
public synchronized void stop() {
if (D) Log.d(TAG, "stop");
if (mConnectThread != null) {
mConnectThread.cancel();
mConnectThread = null;
}
if (mConnectedThread != null) {
mConnectedThread.cancel();
mConnectedThread = null;
}
if (mSecureAcceptThread != null) {
mSecureAcceptThread.cancel();
mSecureAcceptThread = null;
}
if (mInsecureAcceptThread != null) {
mInsecureAcceptThread.cancel();
mInsecureAcceptThread = null;
}
setState(STATE_NONE);
}
thanks in advance