Comments (13)
in class app.akexorcist.bluetotohspp.library.BluetoothSPP line 371 when arr_name.size()==0 a arr ArrayIndexOutOfBoundsException occured
from bluetoothspplibrary.
I noticed this same problem in case if I will switch off the BT in my phone during connection.
from bluetoothspplibrary.
What about that "AcceptThread" null reference mentioned in the very first message?
Do you plan to fix it?
This causes great inconvenience to our company, so if you have stalled the project, plz let me know to use another package
from bluetoothspplibrary.
Thanks!
from bluetoothspplibrary.
I set the Listener, but received nothing. Follow is the codes:
bt.setOnDataReceivedListener(new BluetoothSPP.OnDataReceivedListener() {
@OverRide
public void onDataReceived(byte[] data, String message) {
System.out.println("APP:received-" /+ message/);
}
});
Need your help, thanks
from bluetoothspplibrary.
i have the same problem as r00kie0, setting the bluetooth data listener, but i can not receive
anything, i need your help. thanks.
from bluetoothspplibrary.
onDataReceived(byte[] data, String message)
NOT working here.. same problem.. plz give solution
from bluetoothspplibrary.
The function of onDataReceived not work, plz give solution. tks~
from bluetoothspplibrary.
Hello Guys,
To receive messages correctly the text should have a 0x0A and 0x0D at the end. Like you can see in this code:
// Keep listening to the InputStream while connected
while (true) {
try {
int data = mmInStream.read();
if(data == 0x0A) {
} else if(data == 0x0D) {
buffer = new byte[arr_byte.size()];
for(int i = 0 ; i < arr_byte.size() ; i++) {
buffer[i] = arr_byte.get(i).byteValue();
}
// Send the obtained bytes to the UI Activity
mHandler.obtainMessage(BluetoothState.MESSAGE_READ
, buffer.length, -1, buffer).sendToTarget();
arr_byte = new ArrayList<Integer>();
} else {
arr_byte.add(data);
}
} catch (IOException e) {
connectionLost();
// Start the service over to restart listening mode
BluetoothService.this.start(BluetoothService.this.isAndroid);
break;
}
}
from bluetoothspplibrary.
jtoros13 did you find a solution? I'm getting the same problem and I don't have access to the phone in question.
from bluetoothspplibrary.
Nope, no "out of the box" solution found.
I downloaded the code in my project as a different package, and after adding it as external reference, I changed the code itself.
Hope this helps
jtoros13
from bluetoothspplibrary.
@akexorcist
First of all, thank you for your work in this project.
Sorry for my english, I'm from Argentina. As mentioned in some comments, I need to know if it is going to solve the "AcceptThread" bug, because I have a project to finish and one of the things that slow me down is this bug.
from bluetoothspplibrary.
sorry i got this problem how to slove
"Unsupported method: BaseConfig.getApplicationIdSuffix().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model."
from bluetoothspplibrary.
Related Issues (20)
- 이 블루투스 라이브러리를 사용하려는 한국인들을 위해 HOT 1
- transfer intent
- take multiple masseges on recived data
- Bt
- Context HOT 1
- NullPointerException at app.akexorcist.bluetotohspp.library.BluetoothService$AcceptThread.run (BluetoothService.java:2)
- Not scanning or discoverying nearby bluetooth devices. (startActivityForResult) HOT 2
- Prematurely terminating data packets with byte values of 10 (LF) and 13 (CR) HOT 2
- Can't read data from a BT barcode reader
- Activity crashed A/libc: Fatal signal 11 (SIGSEGV), code 1 HOT 1
- thank u
- getBluetoothService() called with no BluetoothManagerCallback HOT 1
- targetSdkVersion < 4
- the package name is spelled incorrectly...
- ConnectThread NullPointerException when the BT has been manually disabled
- How to make own Reciver
- bt.setupService()
- Fixing send function HOT 1
- How do you solve the issue of broken packets/messages? HOT 1
- Question: Will this library give me serial port in PC when my android device connected to PC using BT?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bluetoothspplibrary.