|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
The B4S SDK uses **Bluetooth 4.0 BLE**, also called Low Energy or Bluetooth Smart Ready. It is available on most new Android devices, with a minimum of **Android 4.3**.
|
|
|
|
|
|
|
|
The B4S SDK is a compiled JAR that can be dropped (together with its dependencies) directly into the `libs` folder in Eclipse, Android Studio or compiled with Ant. The SDK is currently targeting API level 19 (Android 4.4) with minimal API level 18 (Android 4.3) for Bluetooth BLE support.
|
|
|
|
|
|
## Installation
|
|
## Installation
|
|
|
|
|
|
### Add jar libraries
|
|
### Add jar libraries
|
... | @@ -18,7 +24,7 @@ |
... | @@ -18,7 +24,7 @@ |
|
```
|
|
```
|
|
|
|
|
|
### Add Google Play Services (Eclipse/Ant)
|
|
### Add Google Play Services (Eclipse/Ant)
|
|
1. Import the Google Play Services library project. If not installed yet, use the Adroid SDK Manager to install this (currently at version 21). It is advised to copy the library project to your local directory from `android-sdk/extras/google/google_play_services/libproject`. Import the `google-play-services_lib` directory using File -> Import... -> Existing Android Code Into Workspace wizard. Make sure it is marked as Library Project in the Android properties.
|
|
1. Import the Google Play Services library project. If not installed yet, use the Android SDK Manager to install this (currently at version 21). It is advised to copy the library project to your local directory from `android-sdk/extras/google/google_play_services/libproject`. Import the `google-play-services_lib` directory using File -> Import... -> Existing Android Code Into Workspace wizard. Make sure it is marked as Library Project in the Android properties.
|
|
2. Open the properties page of your Android project and add the for the google-play-services_lib as library project dependency. The jar files in `libs` should already be adopted into your Android Private Libraries build.
|
|
2. Open the properties page of your Android project and add the for the google-play-services_lib as library project dependency. The jar files in `libs` should already be adopted into your Android Private Libraries build.
|
|
|
|
|
|
## Usage
|
|
## Usage
|
... | @@ -221,4 +227,6 @@ It is recommended to call these from the `Application`'s 'onCreate` method, but |
... | @@ -221,4 +227,6 @@ It is recommended to call these from the `Application`'s 'onCreate` method, but |
|
|
|
|
|
## Android 6
|
|
## Android 6
|
|
|
|
|
|
With Android 6.0 (API level 23) a new permission system was introduced by Google. On Android 6 devices, users can manually manage permissions on a per-application basis. If an app targets Android 6 (using targetSdkVersion 23 and compileSdkVersion 23), an app also needs to deal with runtime persmissions. This means that permissions such as location access (which is now a so-called 'dangerous' permission) needs to be explicitly requested with a permission request pop-up. Until SDK version 1.4.2, the B4S SDK does not handle this automatically and therefor the integrator needs to [handle permission request dialogs manually](https://developer.android.com/training/permissions/requesting.html). From version 1.5.0 onwards this will be handled for you by the SDK. A request to access the user location will automatically be shown when access was not yet granted. It is important to note that this does not affect any applications, even when running on an Android 6 device, that still target API level 22 or lower. |
|
With Android 6.0 (API level 23) a new permission system was introduced by Google. On Android 6 devices, users can manually manage permissions on a per-application basis. If an app targets Android 6 (using targetSdkVersion 23 and compileSdkVersion 23), an app also needs to deal with runtime permissions. This means that permissions such as location access (which is now a so-called 'dangerous' permission) needs to be explicitly requested with a permission request pop-up. Until SDK version 1.4.2, the B4S SDK does not handle this automatically and therefor the integrator needs to [handle permission request dialogs manually](https://developer.android.com/training/permissions/requesting.html).
|
|
|
|
|
|
|
|
From version 1.5.0 onwards this will be handled for you by the SDK. A request to access the user location will automatically be shown when access was not yet granted. It is important to note that this does not affect any applications, even when running on an Android 6 device, that still target API level 22 or lower. |