envoyer/recevoir des données via Bluetooth
Je suis en train d'envoyer/recevoir une chaîne de caractères à partir d'un appareil android.
J'ai cherché sur google pour les 3 dernières heures et je ne peux pas trouver quelque chose qui fonctionne, tout simplement.
le plus proche que j'ai eu était ceci: fella
et j'obtiens ces erreurs:
CSS:
02-19 15:44:17.680 4680-4680/com.example.jelle.bluetoothconnector W/System.err﹕ at com.example.jelle.bluetoothconnector.BluetoothConnection.init(BluetoothConnection.java:38)
02-19 15:44:17.680 4680-4680/com.example.jelle.bluetoothconnector W/System.err﹕ at com.example.jelle.bluetoothconnector.BluetoothConnection.<init>(BluetoothConnection.java:25)
02-19 15:44:17.680 4680-4680/com.example.jelle.bluetoothconnector W/System.err﹕ at com.example.jelle.bluetoothconnector.ConnectorActivity.btnBluetooth_onCLick(ConnectorActivity.java:92)
02-19 15:44:17.680 4680-4680/com.example.jelle.bluetoothconnector W/System.err﹕ at java.lang.reflect.Method.invoke(Native Method)
02-19 15:44:17.680 4680-4680/com.example.jelle.bluetoothconnector W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:372)
quelqu'un peut m'aider? J'ai juste besoin d'un peu de code qui permet d'envoyer/recevoir une chaîne de caractères via bluetooth pour me faire
Merci!
Vous devez vous connecter pour publier un commentaire.
Le meilleur et le plus complet exemple est Android officielle du bluetooth exemple de discussion. Vous n'avez probablement pas besoin de changer la plupart des choses. Voir ceci:
https://github.com/googlesamples/android-BluetoothChat