Git Product home page Git Product logo

ibks-sdk-android's Introduction

iBKS SDK for Android

ABSTRACT

The iBKS SDK for Android is a library which allows communication, managing and interaction with iBKS Beacons.

The iBKS SDK function prototypes covers the following five packages integrated in the library:

  • Connection
  • Scan
  • Eddystone Service
  • iBeacon Service
  • Global Service

AUDIENCE

The iBKS SDK is primarily focused for Android software developers with basic knowledge of beacon configuration

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.

Let’s play

1. Create a 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:

compile 'com.accent_systems.ibks-sdk:ibks-sdk:1.0.3'

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.

  1. App permissions

In order to manage Bluetooth in Android it’s necessary to request some permissions at user.

Location

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" />

Bluetooth

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" />

Internet

In order to use some functions that request access to internet, it’s necessary to add permissions on AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET" />

  1. EID registration

If you would like to use the EID registration in your APP, follow these steps:

  1. Log in to **Google Console Developers **

  2. Enable Proximity Beacon API

  3. Create the Credentials for your APP:

  • Android API key for your package.

  • OAuth Client ID for your package.

It’s possible that you may 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.

  1. Compile your project

Now, compile your project and you are ready for playing with iBKS-SDK.

We recommend to have a look at “iBKS SDK Sample Project” before starting with your own project in order to get used to iBKS-SDK.

  1. Get started with a sample project

From this github project, you will find the “iBKS SDK Sample Project”. This example shows how to do 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:

  1. Download the project

  2. Open the project with Android Studio

  3. Compile the project

  4. Try the example on your mobile device

Last update: 2019/01/14

ibks-sdk-android's People

Contributors

aboschc avatar fxpastor avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

ibks-sdk-android's Issues

iBeacon Extra Byte on iBKS105

Hi thanks for your library,
I have a question, if I want to know the battery level of the iBeacon, how can I do?
I have enable the "iBeacon Extra Byte"

Required Internet Permission

Hi Team

I have to know one thing, What is the requirement of Internet, Location permission in manifest. As I know I have to scan device ibks devices via blue-tooth So What is the requirement of these permissions.

Please confirm.

Thanks
Gaurav Dixit

Getting Error After Changed Version to com.google.android.gms:***********:11.4.0

Hi Team

I am getting error crashes. Please find detail info below. Currently I am using this version in project "compile 'com.accent_systems.ibks-sdk:ibks-sdk:1.0.2'"

java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:365)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:257)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:784)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzbde;
at com.google.android.gms.auth.zzd.(Unknown Source:53)
at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source:0)
at com.google.sample.libproximitybeacon.ProximityBeaconImpl$AuthTask.doInBackground(ProximityBeaconImpl.java:175)
at com.google.sample.libproximitybeacon.ProximityBeaconImpl$AuthTask.doInBackground(ProximityBeaconImpl.java:143)
at android.os.AsyncTask$2.call(AsyncTask.java:345)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 4 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.internal.zzbde" on path: DexPathList[[zip file "/data/app/com.xefyr.ridez-u-zPlKwRRmU-Onx7Dhi36A==/base.apk"],nativeLibraryDirectories=[/data/app/com.xefyr.ridez-u-zPlKwRRmU-Onx7Dhi36A==/lib/arm, /data/app/com.xefyr.ridez-u-zPlKwRRmU-Onx7Dhi36A==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib, /product/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)

Please suggest information
Thanks
Gaurav

Battery lvl

Hello i try to cath the battery level, the problem is what is the service to call and what's the code to do it?

Antoine.

Getting duplicate class error, is there a way to get an updated SDK with AndroidX?

Hi.

We are trying to integrate the use of your iBKS105 beacon in our project but the current SDK dependencies are completely obsolete (last update 2016) It is throwing us an error about duplicate class as we are already using AndroidX (since 2019) so using in 2021 an SDK so outdated is almost impossible. At least, can download the SDK code to update it by ourselves and use it as a path dependency instead of the regular obsolete gradle dependency?

Duplicate class com.google.android.gms.common.api.zzb found in modules jetified-play-services-base-10.0.1-runtime (com.google.android.gms:play-services-base:10.0.1) and jetified-play-services-basement-17.0.0-runtime (com.google.android.gms:play-services-basement:17.0.0)
Duplicate class com.google.android.gms.common.internal.zzb found in modules jetified-play-services-base-10.0.1-runtime (com.google.android.gms:play-services-base:10.0.1) and jetified-play-services-basement-17.0.0-runtime (com.google.android.gms:play-services-basement:17.0.0)
Duplicate class com.google.android.gms.common.internal.zzd found in modules jetified-play-services-base-10.0.1-runtime (com.google.android.gms:play-services-base:10.0.1) and jetified-play-services-basement-17.0.0-runtime (com.google.android.gms:play-services-basement:17.0.0)
Duplicate class com.google.android.gms.common.internal.zze found in modules jetified-play-services-base-10.0.1-runtime (com.google.android.gms:play-services-base:10.0.1) and jetified-play-services-basement-17.0.0-runtime (com.google.android.gms:play-services-basement:17.0.0)
Duplicate class com.google.android.gms.common.internal.zzg found in modules jetified-play-services-base-10.0.1-runtime (com.google.android.gms:play-services-base:10.0.1) and jetified-play-services-basement-17.0.0-runtime (com.google.android.gms:play-services-basement:17.0.0)
Duplicate class com.google.android.gms.common.internal.zzh found in modules jetified-play-services-base-10.0.1-runtime (com.google.android.gms:play-services-base:10.0.1) and jetified-play-services-basement-17.0.0-runtime (com.google.android.gms:play-services-basement:17.0.0)
Duplicate class com.google.android.gms.common.internal.zzi found in modules jetified-play-services-base-10.0.1-runtime (com.google.android.gms:play-services-base:10.0.1) and jetified-play-services-basement-17.0.0-runtime (com.google.android.gms:play-services-basement:17.0.0)
Duplicate class com.google.android.gms.common.internal.zzl found in modules jetified-play-services-base-10.0.1-runtime (com.google.android.gms:play-services-base:10.0.1) and jetified-play-services-basement-17.0.0-runtime (com.google.android.gms:play-services-basement:17.0.0)
Duplicate class com.google.android.gms.common.internal.zzm found in modules jetified-play-services-base-10.0.1-runtime (com.google.android.gms:play-services-base:10.0.1) and jetified-play-services-basement-17.0.0-runtime (com.google.android.gms:play-services-basement:17.0.0)

Moltes gràcies :)
Rubén

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.