- Home /
How to use BLE pluging
i recently purchased the "Bluetooth LE for iOS, tvOS and Android" plugin from the asset store link :"https://www.assetstore.unity3d.com/en/#!/content/26661"and i have no clue how to use being a beginner to unity i imported the sample scene and when i build the sample scene for android i get an error saying "cannot convert classes into dex format" i have absolutely no idea how to solve this problem
i basically want to make a android that receives serial data from an arduino via bluettooth Any help will be much appreciated
Answer by fenomeno69 · May 09, 2017 at 05:49 AM
Hello @BaluB
I don't know If you have found any solution yet. I did the same for the ios I can tell that they are a few things that you have to do to make it works.
You have Initialize and scan for the BLE
On scanning Add the peripheral and do the Connection
Immediately after connection do the SubscribeCharacteristicWithDeviceAddress
In the BluetoothDeviceScript find the line 248 If you read the code after that you can see how it look up the callback to try to receive the data.
There is also something else you need to know. You have to know that the system is asynchronous. That means when you call the method it doesn't respond right away and may not complete as fast as you expect.
You can see more details and my comments here: http://nerdclub-uk.blogspot.gr/2017/03/bluetooth-with-unity-for-ios-and-android.html
Your answer
Follow this Question
Related Questions
How do I to send a varible via bluetooth android 0 Answers
Arduino bluetooth to android 2 Answers
How to receive data on android device from bluetooth module with Unity3d 2 Answers
App unity-android-bluetooth-arduino 0 Answers
Android Bluetooth 0 Answers