An Android platform provides API to access Bluetooth. Not all Android-based smartphones have BLE. There are many tools on Play Store to detect whether Android's Bluetooth is BLE or not.
To work with Bluetooth on Android, we can use the
android.bluetooth
package (http://developer.android.com/guide/topics/connectivity/bluetooth.html).
For testing, we build an Android app that retrieves a list of paired Bluetooth devices on an Android device. I use Intellij IDEA, https://www.jetbrains.com/idea, but you can also use Android Studio, http://developer.android.com/sdk/index.html. Download and install this tool.
Create a new project for Android named mybluetooth
. First, modify the AndroidManifest.xml
file to enable Bluetooth features on the Android platform. The following is the AndroidManifest.xml
file:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="akur.mybluetooth" ...