-1

I'm (trying to) develop a Android application. It's aim is to display information received from an Arduino Nano (or maybe Uno, it's not decided yet) using an HC-06, to communicate by Bluetooth.

I've tried many (everything i've found) code exemple, but it all didn't work for me, I dont know if it is because I made it wrong or what but I can't get the nearby Bluetooth devices' names.

I want to connect to the Arduino and being able to read data it send.

If someone know how to separate the bytes received and put them into different variables, I'm listening too.

Markus Kauppinen
  • 3,025
  • 4
  • 20
  • 30
  • 2
    Please provide some minimal code you have been trying in order to get this working. – jcuypers Mar 28 '19 at 10:09
  • One of the problem is with the `mmSocket = mmDevice.createRfcommSocketToServiceRecord(MY_UUID); ` being a null object – BiKit Projet Mar 28 '19 at 10:19
  • Without the code we don't know why either `mmSocket` or `mmDevice` is `null` or `createRfcommSocketToServiceRecord(MY_UUID)` returns `null`. Also, the [crash log](https://stackoverflow.com/questions/23353173/unfortunately-myapp-has-stopped-how-can-i-solve-this) will help in solving the problem. – Markus Kauppinen Mar 28 '19 at 10:40

1 Answers1

0

You can take a look at this article Create an Android App With Android Studio to Control LED , it will help you create an Android app that will pair with Bluetooth devices(Arduino) and control a LED.

Amine
  • 2,241
  • 2
  • 19
  • 41