I once wondered if can I get a specific bluetooth version of Android devices? I searched a little bit and I figured out that it's not possible.
So, I wondered something else this time. Is bluetooth version related with Android version? Such as:
bluetooth 2.0 run at android 2.3.x devices and below
bluetooth 3.0 run at android 3.x.x devices,
bluetooth 4.0 run at android 4.x.x and above
Can I make an assumption something like that?
If I can, I'll use Android version of devices.
Note: By the way, I already know that I can get bluetooth type, such as bluetooth classic or bluetooth low energy.
Related
I have an old Android device using Gingerbread which is bluetooth low energy capable.
However when I try to build a BTLE app Android Studio complains saying that minimun SDK is 18 and I have 10.
I tried to avoid those problems using SuppressLint and I can compile the application but dalvik complains about linking the class.
Link of class 'Lcom/package/class;' failed
Is there any way to force dalvik to link my class even if I have an older Android device or to modify bluetooth low energy api so that it doesnt complain?
Any idea where does Android studio gets the information to know that BTLE api is only available from API > 18?
Thanks
Any idea where does Android studio gets the information to know that BTLE api is only available from API > 18?
Of course Android studio got the information from the SDK.
Is there any way to force dalvik to link my class even if I have an
older Android device or to modify bluetooth low energy api so that it
doesnt complain?
Simply no way to force it working. The api just does not exist before API level 18.
If by "modify bluetooth low energy api" you mean you will build your own version of Gingerbread with BLE support, you will have a extremely slim (or non-existent) chance to get it working. However please keep in mind that having a chip that supports BLE does not mean the device can use BLE.
Is that possible to implement iBeacon API for android 4.2 and lower with BLE?
update:
According to davidgyoung, theoretically it's possible to enable ibeacon in BLE enabled devices with android 4.3- only if building up a ibeacon API from bottom.
Bluetooth low energy technology was only added in Android 4.3+.
Prior Android devices also did not had Bluetooth chips capable of BLE (standard v4.0).
So no, you cannot make a device without a BLE chip work as a BLE chip (and even if you did, it would make no sense nor use).
Android phones must have both Bluetooth 4.0 hardware and a SDK to detect iBeacons. Generally this means Android 4.3+ and a phone made in late 2012 or later.
Samsung phones include a proprietary Bluetooth 4.0 SDK for their devices with Bluetooth 4.0 chips and Android versions 4.1 and 4.2. Devices like the Galaxy S3 shipped with this.
There is no off-the-shelf iBeacon detection library using this SDK, so if you want to detect iBeacons on these devices, you would have to roll your own.
Also, keep in mind that many if not most of these devices are already getting upgrades to Android 4.3, so this is a shrinking pool of devices for which this is possible and necessary. For non-Samsung devices and Samsung devices manufactured before late 2012, it is not possible at all due to lack of a Bluetooth 4.0 library or Bluetooth 4.0 hardware.
Quick question. I can't seem to find this in the Android docs, so I don't think it is possible, but is it possible to have an Android 4.3 device (in my case, a Nexus 4) behave as a Bluetooth peripheral? I know iOS supports both peripheral and central, but it seems like Android only supports central.
I'd like to connect an Android device to a Mac using Bluetooth LE, but since OS X doesn't support peripheral mode and it looks like Android doesn't either, I might have to go with Bluetooth 2 or another communication method.
Unfortunately there is no way for Android devices to act as a peripheral. He can creates GATT servers, services and charachteristics but there is no way to make the advertising.
Doc: http://developer.android.com/guide/topics/connectivity/bluetooth-le.html
The phone supports the central role;
I'm waiting for this feature too, but it seems we have to wait for next Android releases.
Yeah, Android 4.3 does not support peripheral mode. I started a feature request on the Android Open Source Project website. If you also want to see this feature, add a comment or star the post. I think they will get around to it eventually, but it is good to let them know that this is a feature that developers are looking for.
https://code.google.com/p/android/issues/detail?can=2&q=59693&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&id=59693
issue: 59693
In API level 4, 4.1,4.2,4.3 its not possible.
Android lollipop API version 5.0.X sdk supports peripheral mode in BLE however this feature is chipset dependent (Phones).
android phones with Broadcom Bluetooth solution already supports it
If you have a Nexus 5 you can install Android L there and try it, I just did it few months ago, Android L has support to act as a peripheral.
Im doing an android app to pair a non-android device with bluetooth 4.0 LE, but my 4.0Bluetooth-android-phone doesnt discover the device anyway. I discover other devices like phones, or tablets.
The question is: Do i have to add some extra code if i want to work with bluetooth 4.0 devices?
Thanks.
Bluetooth 4.0 (or BLE) is not supported in Android at the moment. It will be supported in Android 4.3 (API level 18). Among other places, you can read more about it here and here. Several Android devices has already been certified with Bluetooth 4.0 support, but it won't work before the update is released.
That said, according to this post some devices does support it, but they need custom BLE libraries that the companies have developed.
I am involved in a Android Project that connects the sensor using Bluetooth 4.0. AFAIK android didn't support Bluetooth 4.0. I tried with my laptop bluetooth 4.0. I tried with Broadcom using this. Later i came to know my Laptop Bluetooth 4.0 is Atheros Bluetooth 4.0 and later i searched for Atheros Bluetooth 4.0 API using android mobiles and tablets. I saw Qualcomm having Bluetooth 4.0 tablet. I want to know, is Atheros giving API for Bluetooth 4.0 for Android SDK.
Finally, long way of search, i found that up to today(23/12/12), Atheros not giving Bluetooth API for developers. But they are providing other API's for Audio, Camera, Device Info and Sensor(mobile shake). So, can't try on laptop also. Dgel comment and link helped me a lot and made me, come to the conclusion.
Android Bluetooth (and other) API's are not specific to the hardware (or software stack).
They are generic and fairly high-level, and Yes they include Bluetooth 4.0.
The actually support for BT 4 depends on the device. Recent Nexus devices support BT4 (both in hardware and in software) as long as they have the Android 4.2 update.
If you root your device you can get to the 'raw' vendor API's, but I don't know what that looks like for BT4, or wheteher any of that is published. In most cases that is Broadcom based, not Atheros.
EDIT:
I just saw this:
http://code.google.com/p/broadcom-ble/
I'm not familiar with this, but I suspect that it was just a stop gap measure before BT4 was added to the official Android API in 4.1.