I just want to add some features in sample bluetooth chat application and want to test its working at each successive level.
since i have limited resources like a laptop and a android based phone. How can i connect two devices to run features that support multiple devices.
I am running android based bluetooth chat application on my android phone.I want to add some features that required bluetooth. The problem is that i am having single android phone right now but i want to check whether it is really connecting to other devices and want to test features that need more than one device. Is their any solution or i need two android phones.
Related
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 am planning a new application that I would like to put on the smartwatch. I would like to have it usable also when there is no phone nearby. The app needs no Internet connection to work, could synchronize data to the phone later and I do not need anything from the phone while the app is running. However I could use the phone no problem to install the app.
I have googled, there are some foggy talks on a web that this is not possible, Android watch must always be connected to the phone for apps to run. How much is it true?
With Android Wear 2.0 it is possible to now develop standalone applications and thus eliminates the need for a mobile 'companion' completely.
Please follow this link for more information: https://developer.android.com/wear/preview/index.html
As I am aware, the current Android Wear version always requires a companion app for installation purposes etc. But with 2.0 this is no longer necessary. It would probably make sense for you to start developing with 2.0 now. That being said, it is still in a development preview and can officially run on only two smart watches (Huawei Watch and LG Watch Urbane 2nd Edition)
Wearable apps are run directly on wearables and don't require presence of a phone except for installation or phone-provided features (voice recognition, SMS, internet connection etc.)
Note that some features are wearable-provided or phone-provided depending on the hardware configuration of the watch/wearable (eg. GPS).
Yes, it is most definitely possible. As long as the wearable app doesn't require any functionality from the phone then it can operate as a standalone device. It will require a companion app on the phone to install the app on the wear device.
There are several wear apps that work without the need to be tethered to the phone, including Google Play music. There is the possibility of designing wear apps for hardware on only a few wear devices - I know that Ghostracer has standalone functionality using GPS, but it requires the wear device to have a GPS chip (it is designed for the Sony SmartWatch 3).
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.
I need some guidance on a project im currently working on - I work on a project to communicate with a BLE device s.t. the device is connected to an android phone and transmits some data once in a while. I saw some lectures on BLE communication with android devices and read some information on the android 4.3 bluetooth API but there are some things I didnt got yet
In case I want my app to be compitable backward (up to 2.3) is that possible? did they (Google) include the new features on the support package?
Where can I find some good code example of using the android as a client?
When communicating with an android device I need the charestirestic of the bluetooth device to have UUID, do I generate some UUID's on the run? (and in that case how) or do I hard-code them on the app? (since on that case two people using this app and close to each other basically can read each other's signal, don't they?)
In case I want my app to be compitable backward (up to 2.3) is that possible? did they (google) include the new features on the support package?
Bluetooth low energy needs to be supported by the HW and there are only a handful of devices with the necessary Bluetooth radio running an older version of Android. For sure no device running 2.3 will be able to run BLE.
Where can I find some good code example of using the android as a client?
The examples provided on developer.android.com is actually quite good
When communicating with an android device I need the charestirestic of the bluetooth device to have UUID, do I generate some UUID's on the run?
Bluetooth Special Interest Group has already created a bunch of assigned numbers. These have a well defined meaning across all BLE devices and services. Then businesses can apply for a range of UUID's that they can use to defined there own services.
On top of that there are some free ranges where everyone can define and use UUID's. These will not be well defined across devices, meaning other applications will not understand the UUID's you've defined.