This document explains how to setup all the tools needed to start using iBKS SDK.
This document is primarily focused for Android software developers with basic knowledge of beacon configuration
SO Requirements: Android 5.0 or higher
- Before you start
- Let’s play
1. Before you start
This SDK will help you to manage iBKS Beacons with your own Android APP in a few easy steps.
All you need:
- Android Studio
- Android device with 5.0 version or above.
- At least one iBKS Beacon with FW version “EDSTEID V5.2016.06.29.1” or above.
- github repository:
- Document iBKS SDK for Android Reference Manual
- iBKS SDK Sample Project
2. Let’s play
2.1. Create project
First of all, create a new Android Studio project and add the iBKS SDK to the build.gradle (Module:app) declaring the following dependency (check the latest version here):
The minSdkVersion of the app should be 21 or higher because there are some Bluetooth functions that don’t work for older Android SDK versions.
2.2. App permissions
In order to manage Bluetooth in Android it’s necessary to request the user’s permissions.
If the Android version is 6.0 or higher it’s necessary to request location permission. To do this, it’s necessary to add permission in AndroidManifest.xml
<uses-permission android_name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android_name="android.permission.ACCESS_FINE_LOCATION" />
In order to use Bluetooth in Android device, the first thing to do is check if the device that runs the app has Bluetooth Low Energy (beacons work with this type of Bluetooth) and if it is enabled. To enable Bluetooth it’s necessary to add permission in AndroidManifest.xml
<uses-permission android_name="android.permission.BLUETOOTH" /> <uses-permission android_name="android.permission.BLUETOOTH_ADMIN" />
In order to use some functions that request access to the Internet, it’s necessary to add permissions on AndroidManifest.xml
<uses-permission android_name="android.permission.INTERNET" />
2.3. EID registration
If you would like to use the EID registration in your APP, follow these steps:
- Log in to Google Console Developers
- Enable Proximity Beacon API
- Create the Credentials for your APP:
- Android API key for your package.
- OAuth Client ID for your package.
It’s possible that you may need to wait some minutes or hours to grant the access to the API.
The users of your APP don’t need to create Credentials but they should also enable the Proximity Beacon API on their account.
2.4. Compile your project
Now, compile your project and you are ready to play with iBKS-SDK.
We recommend taking a look at iBKS SDK Sample Project before starting with your own project in order to get used to iBKS-SDK.
2.5. Get started with a sample project
In the iBKS SDK documentation, you will find the “iBKS SDK Sample Project”. This example shows you how to perform the main tasks on a Bluetooth APP such as:
- Scan devices
- Connect devices
- Read/Write characteristics
- Set/Get Eddystone Slots
- Register EID beacon
- Get EID in Clear
- Set/Get iBeacon Slots
- Set/Get Characteristics of Global service
- Get client account and Google project Id
- Parse advertising data
The “iBKS SDK Sample Project” App starts with a scan of Bluetooth devices. When an item of the list is clicked, the app establishes the connection with the beacon that allows you to do any of the tasks mentioned above. Follow the next steps to start playing:
- Download the project
- Open the project with Android Studio
- Compile the project
- Try the example on your mobile device