... | ... | @@ -9,9 +9,9 @@ The SDK depends on the Jackson and EventBus libraries, which are all Apache Lice |
|
|
|
|
|
## Installation
|
|
|
|
|
|
### Add jar libraries
|
|
|
1. Open your application project
|
|
|
2. Drop the jar files found in `sdk/libs` directly into the `libs` folder of your existing Android project. When using Gradle to build you may use the following Maven dependencies instead of the separate jar files:
|
|
|
### Add dependencies
|
|
|
|
|
|
When using Gradle as your build system, simply **add the `b4s-android-sdk.jar` to your /libs folder** and add or update the following dependencies (where `play-services-gcm` can be omitted if push messaging is not needed):
|
|
|
|
|
|
```gradle
|
|
|
dependencies {
|
... | ... | @@ -25,13 +25,14 @@ The SDK depends on the Jackson and EventBus libraries, which are all Apache Lice |
|
|
}
|
|
|
```
|
|
|
|
|
|
### Add Google Play Services (Eclipse/Ant)
|
|
|
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.
|
|
|
When still using Eclipse/Ant/Maven to build your application, drop the jar files found in [`sdk/libs`](https://github.com/ezeeworld/B4S-Android-SDK/tree/master/sdk/libs) directly into the `libs` folder of your existing Android project. Next, add the Play Services as library project, if not yet done:
|
|
|
|
|
|
1. Import the Google Play Services library project. If not installed yet, use the Android SDK Manager to install this. 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.
|
|
|
|
|
|
## Usage
|
|
|
## Configuration of the SDK
|
|
|
|
|
|
### Configure the SDK
|
|
|
### Define B4S services
|
|
|
|
|
|
1. Open your project AndroidManifest.xml
|
|
|
2. Add the required permissions for access to internet, Bluetooth LE, location and the boot receiver:
|
... | ... | |