... | ... | @@ -23,27 +23,15 @@ See [the `sample-eclipse` project](https://github.com/ezeeworld/B4S-Android-SDK/ |
|
|
As the B4S project .JAR files only include the code, the services (and activities and broadcast receivers) still need to be declared in your `AndroidManifest.xml`:
|
|
|
|
|
|
1. Open your project AndroidManifest.xml
|
|
|
2. Add the required permissions for access to internet, Bluetooth LE, location and the boot receiver:
|
|
|
|
|
|
```xml
|
|
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
|
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
|
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
|
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
|
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
|
<uses-feature android:name="android.hardware.bluetooth_le" android:required="false" />
|
|
|
```
|
|
|
|
|
|
3. The Google Play Services requires some meta data in the `<application>` tag.
|
|
|
2. The Google Play Services requires some meta data in the `<application>` tag.
|
|
|
|
|
|
```xml
|
|
|
<meta-data android:name="com.google.android.gms.version"
|
|
|
android:value="@integer/google_play_services_version" />
|
|
|
```
|
|
|
|
|
|
4. Add the B4S services to the `<application>` element to allow background scanning for and interacting with beacons.
|
|
|
3. Add the B4S services to the `<application>` element to allow background scanning for and interacting with beacons.
|
|
|
|
|
|
```xml
|
|
|
<!-- Background monitoring for beacons -->
|
... | ... | |