I want to connect a 3rd party bluetooth device to my Android Wear watch (Samsung Gear Live). I am trying to find documentation on how to do this but I am not having any luck. All the searches I do seem to think I want to attach to a phone.
Does anyone know of a good example that shows how to connect, for example, a bluetooth heart rate monitor (or other device) to the Android Wear so I can keep a history when the phone isn't present? Is this even possible? Would it be the same protocols as doing it from a phone/tablet?
#Ryan Tensmeyer, I think #Wayne Pieksarki's answer is now out-dated. I was able to create and run a stand-alone app that used BLE to connect to a third-party bluetooth device, namely, a wireless thermometer. I used a library called SweetBlue and tested the stand-alone app on an Android Wear Moto 360. It worked great -- no phone required!
It is not possible to connect 3rd party bluetooth devices to an Android Wear watch as you describe. You will need to pair your heart rate monitor with your phone, extract the data you want, and then use the Data Layer API to send the data to the wearable for display to the user.
EDIT: Android Wear devices now support the ability to pair with Bluetooth devices.
Related
I am working with a firmware team that writes firmware on a QCC3056 Qualcomm chipset that supports earbuds and I develop an android application that supports the BLE earbud Bluetooth device. The earbuds also support google fast pair and this feature requires the BLE mac address to be rotated every 15 min.
So the issue I am seeing here is the android Bluetooth settings recognize two Bluetooth devices with the same name(one is classic and the other one is BLE). I can tell by the mac addresses that one belongs to classic and the other belongs to the BLE address. We are able to connect to the classic instance. However, we are unable to connect to the BLE instance. We would like just one name to show up and the user should be able to connect to it. The firmware team thinks this is expected behavior(two names showing up). As far as I know, from the android end, we don't have any control over the Bluetooth settings. So I wanted to understand if this behavior is expected. I have tested this scenario with SONY WF-1000XM3 which supports Google Fast Pair and I have noticed only one name showing up.
It would be great if anyone can suggest the best possible approach I can take here.
I want to know if we can detect android phones as well with BLE Scan. I am trying to develop an android app which can scan nearby Bluetooth Android devices.
I checked both android devices are compatible with BLE with this app: https://play.google.com/store/apps/details?id=com.myan.michaelyanyoga.bluetoothchecker
Note: I am using this code to develop my scanner app: https://github.com/kaviles/BLE_Tutorials. I am able to see my laptop Bluetooth on this list but not other android phones(which supports BLE).
To detect Android phones using BLE, the other device needs to:-
Have Bluetooth turned on.
Be advertising
Unfortunately, most devices are not doing this by default, which means you may not be able to use BLE for your intended purposes. You can test this by doing the following:-
Download the nRF Connect Android app.
Go to ADVERTISER from the top menu.
Toggle the "Test" advertiser.
After this you should begin to see your Android device via Bluetooth.
I hope this helps.
I want to connect two android phone only via BLE. Is it possible? because as per my understanding using Android API I can only connect with BLE enabled devices like smartwatches headphones etc. If I run startLescan() method it only shows my fitness band and headphone.
It does not show other android phones.
Yes its possible. As the hardware equally supports to act as a master or slave, but it depends on whether the OS has provide you the required interface to make a device act as master as well as slave. THe BLE in android phone is equally capabale of becoming a master or peripherical but it depends on whehter android has exposed some interface to make it work ortherwise if not you have to root/reflash your device and make changes at OS level.
Yes, two BLE devices can communicate and has been ever since the original 4.0 release.
The change in 4.1 states that a single device can act as both a master and as a slave simultaneously to two different devices. Once device has to act as periphiral and other as master.
See this: http://www.blemobileapps.com/ble-mobile/
For android this link might be helpful for you: https://code.tutsplus.com/tutorials/how-to-advertise-android-as-a-bluetooth-le-peripheral--cms-25426
Reference: Chipsets/Devices supporting Android 5 BLE peripheral mode
Let me know if this answers your question.
It is possible to connect to Android phone with BLE.
One of the phones has to be a BLE Server and must advertise itself
(a role usually performed by devices like smartwatches and headphones) to be discovered by the other phone.
To advertise itself the app uses the BluetoothLeAdvertiser class.
Such API was added starting from level 21 Lollipop so your server phone should be at least a 5.0 Android device.
Personally I found this tutorial by Andrew Lunsford very useful for understanding how to realize such functionality.
I know, transferring is restricted and i do not need that. Also, i'm aware of BLE capabilities. However, ~35% of android devices out there do not support peripheral mode.
If someone ever tried this, could you tell me: does ios BT api allow to discover android devices? I need only mac (or whatever it called) address from android device, nothing else.
iOS (CoreBluetooth) can discover any Android BLE device as long as it supports the Peripheral role. If your Android device does not support Peripheral role then the iOS device needs to be the Peripheral in your connection scenario.
If you want to use Bluetooth Classic, that is a completely different story because in order to use Bluetooth Classic on iOS you need to be member of Apple's MFI program that comes with extra fees and an NDA.
I know it had been asked many times about connect Ios and android via bluetooth.
I just want to know if android os update to 4.3 and use the bluetooth four-chip,it is any possible for their connection?
I only need receive some bytes from android device,then display on the Ios device.
for now, the answer is no. And I am talking about the newest bluetooth low energy technology.
Since android 4.3, you can now turn your android device into a central, listening to other peripherals's advertisement. However as of today, android 4.4.2, google still haven't realised any public api which allows you to turn android into a peripheral(like a broadcaster). So you can't advertise or send data. Although I did see a page saying you can do it privately, I haven't tried it yet.
http://blog.cozybit.com/enabling-peripheral-mode-in-android-kitkat-4-4/
On the iOS side, in iOS7, apple added new apis and now you can turn your iPhone into either a peripheral or central(not at the same time). So it is ok for inter-iOS exchanges, while android can only listen and receive data from iOS. You can try searching iKardz on the App Store and see how it's done on 2 iOS devices.
http://www.ikardz.me
However, the story didn't end here. Due to some bugs in google bluetooth apis, you can't actually connect to any smart devices for now, for details please see this link.
Communicating between iOS and Android with Bluetooth LE
SO for the record, this limit DID NOT come from apple.