Why ibeacon only support android 4.3+? - android

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.

Related

BLE Issue on samsung devices

Android BLE code is not properly working on Samsung devices whereas it works with other android devices .
Some time we are able to get values doing some work around but it is not works as smooth as we required.
I wonder about the Samsung device behavior any one help me to know about what is the main reason behind the same and what is the permanent solution of the same.
You are using the Bluetooth 4.0, you must update the Samsung mobile phone system to more than 4.3 .
Android 4.3 (API Level 18) introduces built-in platform support for Bluetooth Low Energy in the central role and provides APIs that apps can use to discover devices, query for services, and read/write characteristics
See https://developer.android.com/guide/topics/connectivity/bluetooth-le.html for details.

Read UDID, Major, Minor of beacon on android devices running on versions prior to 4.3

Is the any way through which i can detect and read UDID, Major, Minor of beacon on android devices running on versions prior to 4.3 ?
On Samsung devices with Bluetooth LE this is possible, for other non-jail broken pre-4.3 Android devices it is not.
The problem is you need a Bluetooth LE library to see iBeacons. Such a library cannot be added to non-jail broken phones because it requires binary driver to the Bluetooth hardware.
Samsung provides this in a proprietary API installed on its phones, but only on newer ones with Bluetooth LE. For other pre-4.3 phones, I am afraid you are out of luck.

Does Android KitKat allows devices that support Bluetooth LE to act as a peripheral device?

Till Android 4.3, an Android device with Bluetooth Low Energy support could only act as a central device. As is given in the Android 4.3 Bluetooth LE docs:
Android 4.3 (API Level 18) introduces built-in platform support for Bluetooth Low Energy in the central role and provides APIs that apps can use to discover devices, query for services, and read/write characteristics.
With the introduction of Android 4.4 KitKat, can it also behave as a peripheral device now? I couldn't find any documentation of that. If not, then do we have to wait for Android 4.5 for getting the BTLE peripheral mode on Android device? Or is there any alternative way in which an Android device can be made to act as a peripheral device?
Not in this version but there is evidence that it is coming soon.
If you look in BluetoothGatt.java in the android-19 sources there are new methods listen and setAdvData that weren't there in android-18.
However these are not documented as I don't think native support is complete yet. The last check in on AOSP for peripheral mode was titled "LE: Add peripheral role support (2/4)". Also, setAdvData and listen have this code:
if (mContext == null || !mContext.getResources().getBoolean(com.android.internal.R.bool.config_bluetooth_le_peripheral_mode_supported))
{
throw new UnsupportedOperationException("BluetoothGatt#listen is blocked");
}
Looking in android/platform_frameworks_base/blob/master/core/res/res/values/config.xml from the Android sources you can see this is currently disabled:
<!-- Boolean indicating if current platform supports BLE peripheral mode -->
<bool name="config_bluetooth_le_peripheral_mode_supported">false</bool>
Thanks everyone for the answers. Just to update, as of June 2014, it is offered in the Android L Developer preview. Hope to see it in the Android L official release. From their blog New in Android: L Developer Preview and Google Play Services 5.0:
The L Developer Preview, lets you explore many of the new features and capabilities of the next version of Android, and offers everything you need to get started developing and testing on the new platform. Here are a few of the highlights for developers:
BLE Peripheral Mode — Android devices can now function in Bluetooth Low Energy (BLE) peripheral mode. Apps can use this capability to broadcast their presence to nearby devices — for example, you can now build apps that let a device to function as a pedometer or health monitor and transmit data to another BLE device.
Update:
The bad news is that BLE Peripheral mode will only work on the newer Android devices (as per the date), viz Nexus 6 and Nexus 9. It won't work on Nexus 4/ Nexus 5/nexus 7/ nexus 10 even if you update it to Android 5.0. You can read the comment by one of the Android Project manager on BLE advertise mode not working ticket. He says:
We introduced BLE peripheral mode in Android 5.0 Lollipop. Nexus 6 and Nexus 9 are the first two production Nexus devices that support BLE peripheral mode. Due to hardware chipset dependency, older Nexus devices (4/5/7) will not have access to the feature on Lollipop.
http://developer.android.com/sdk/api_diff/19/changes.html
By looking at the full api difference, the answer in short : NO
==============
To add peripheral role support now you have to get your hands dirty to customize the Bluedroid stack in the OS level, or try your luck on XDA developers to see if anyone has done this before. I am not sure the current Android phone support peripheral role at hardware level,though .

Scan a 4.0 Bluetooth device it's not working

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.

Atheros Bluetooth 4.0 Support API for Android

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.

Categories

Resources