Skip to content

Commit

Permalink
Merge commit '15122c9d56b27af7d6231898e6625b96cb8df41c'
Browse files Browse the repository at this point in the history
Fixed null ids problem with AltBeacon
Tweaked Bluetooth adapter access to it's only checked when version supported
  • Loading branch information
mrtree1 committed Feb 1, 2015
2 parents 7caa7a2 + 15122c9 commit 98d246f
Show file tree
Hide file tree
Showing 33 changed files with 114 additions and 3,738 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 3.3.0

## Features

* New feature: ```enableBluetooth```/```disableBluetooth``` (Android only) (Thanks to @akreienbring)
* New feature: ```isBluetoothEnabled```
* AltBeacon library backend for Android version (Thanks to @RonMen)

# 3.2.2

## Features
Expand Down
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ cordova.plugins.locationManager.stopRangingBeaconsInRegion(beaconRegion)
```

##### Determine if advertising is supported (iOS is supported, Android is not)
##### Determine if advertising is supported (iOS is supported, Android is not yet)

```
cordova.plugins.locationManager.isAdvertisingAvailable()
Expand Down Expand Up @@ -290,11 +290,28 @@ cordova.plugins.locationManager.stopAdvertising()
```

##### Enable/Disable BlueTooth (Android only)

```
cordova.plugins.locationManager.isBluetoothEnabled()
.then(function(isEnabled){
console.log("isEnabled: " + isEnabled);
if (isEnabled) {
cordova.plugins.locationManager.disableBluetooth();
} else {
cordova.plugins.locationManager.enableBluetooth();
}
})
.fail(console.error)
.done();
```

## Contributions

> Contributions are welcome at all times, please make sure that the tests are running without errors
> before submitting a pull request. The current development branch that you should submit your pull requests against is
> "v3.x".
> "master" branch.
### How to execute the tests - OS X

Expand Down
Binary file added libs/android/altbeacon.jar
Binary file not shown.
48 changes: 14 additions & 34 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="com.unarin.cordova.beacon" version="3.2.2" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<plugin id="com.unarin.cordova.beacon" version="3.3.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">

<name>Proximity Beacon Plugin</name>
<description>Proximity Beacon Monitoring and Transmission Plugin (supporting iBeacons)</description>
Expand Down Expand Up @@ -83,61 +83,41 @@
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest/application">
<receiver android:name="org.altbeacon.beacon.startup.StartupBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
</intent-filter>
</receiver>
<service android:enabled="true"
android:exported="true"
android:isolatedProcess="false"
android:label="iBeacon"
android:name="com.radiusnetworks.ibeacon.service.IBeaconService">
android:name="org.altbeacon.beacon.service.BeaconService">
</service>
<service android:enabled="true"
android:name="com.radiusnetworks.ibeacon.IBeaconIntentProcessor">
android:name="org.altbeacon.beacon.BeaconIntentProcessor">
<meta-data android:name="background" android:value="true" />
<intent-filter android:priority="1" >
<action android:name="com.unarin.cordova.beacon.IBeaconPlugin.DID_RANGING" />
<action android:name="com.unarin.cordova.beacon.IBeaconPlugin.DID_MONITORING" />
</intent-filter>
</service>
</config-file>



<source-file src="src/android/LocationManager.java" target-dir="src/com/unarin/cordova/beacon" />
<source-file src="src/android/IBeaconServiceNotifier.java" target-dir="src/com/unarin/cordova/beacon" />
<source-file src="src/android/ILocationManagerCommand.java" target-dir="src/com/unarin/cordova/beacon" />
<source-file src="src/android/PausableThreadPoolExecutor.java" target-dir="src/com/unarin/cordova/beacon" />

<source-file src="src/android/com/radiusnetworks/bluetooth/BluetoothCrashResolver.java" target-dir="src/com/radiusnetworks/bluetooth" />
<source-file src="src/android/com/radiusnetworks/ibeacon/BleNotAvailableException.java" target-dir="src/com/radiusnetworks/ibeacon" />
<source-file src="src/android/com/radiusnetworks/ibeacon/IBeacon.java" target-dir="src/com/radiusnetworks/ibeacon" />
<source-file src="src/android/com/radiusnetworks/ibeacon/IBeaconConsumer.java" target-dir="src/com/radiusnetworks/ibeacon" />
<source-file src="src/android/com/radiusnetworks/ibeacon/IBeaconData.java" target-dir="src/com/radiusnetworks/ibeacon" />
<source-file src="src/android/com/radiusnetworks/ibeacon/IBeaconDataNotifier.java" target-dir="src/com/radiusnetworks/ibeacon" />
<source-file src="src/android/com/radiusnetworks/ibeacon/IBeaconIntentProcessor.java" target-dir="src/com/radiusnetworks/ibeacon" />
<source-file src="src/android/com/radiusnetworks/ibeacon/IBeaconManager.java" target-dir="src/com/radiusnetworks/ibeacon" />
<source-file src="src/android/com/radiusnetworks/ibeacon/MonitorNotifier.java" target-dir="src/com/radiusnetworks/ibeacon" />
<source-file src="src/android/com/radiusnetworks/ibeacon/RangeNotifier.java" target-dir="src/com/radiusnetworks/ibeacon" />
<source-file src="src/android/com/radiusnetworks/ibeacon/Region.java" target-dir="src/com/radiusnetworks/ibeacon" />
<source-file src="src/android/com/radiusnetworks/ibeacon/client/DataProviderException.java" target-dir="src/com/radiusnetworks/ibeacon/client" />
<source-file src="src/android/com/radiusnetworks/ibeacon/client/IBeaconDataFactory.java" target-dir="src/com/radiusnetworks/ibeacon/client" />
<source-file src="src/android/com/radiusnetworks/ibeacon/client/NullIBeaconDataFactory.java" target-dir="src/com/radiusnetworks/ibeacon/client" />
<source-file src="src/android/com/radiusnetworks/ibeacon/client/RangedIBeacon.java" target-dir="src/com/radiusnetworks/ibeacon/client" />
<source-file src="src/android/com/radiusnetworks/ibeacon/client/RangingTracker.java" target-dir="src/com/radiusnetworks/ibeacon/client" />
<source-file src="src/android/com/radiusnetworks/ibeacon/service/Callback.java" target-dir="src/com/radiusnetworks/ibeacon/service" />
<source-file src="src/android/com/radiusnetworks/ibeacon/service/IBeaconData.java" target-dir="src/com/radiusnetworks/ibeacon/service" />
<source-file src="src/android/com/radiusnetworks/ibeacon/service/IBeaconService.java" target-dir="src/com/radiusnetworks/ibeacon/service" />
<source-file src="src/android/com/radiusnetworks/ibeacon/service/MonitoringData.java" target-dir="src/com/radiusnetworks/ibeacon/service" />
<source-file src="src/android/com/radiusnetworks/ibeacon/service/MonitorState.java" target-dir="src/com/radiusnetworks/ibeacon/service" />
<source-file src="src/android/com/radiusnetworks/ibeacon/service/RangeState.java" target-dir="src/com/radiusnetworks/ibeacon/service" />
<source-file src="src/android/com/radiusnetworks/ibeacon/service/RangingData.java" target-dir="src/com/radiusnetworks/ibeacon/service" />
<source-file src="src/android/com/radiusnetworks/ibeacon/service/RegionData.java" target-dir="src/com/radiusnetworks/ibeacon/service" />
<source-file src="src/android/com/radiusnetworks/ibeacon/service/StartRMData.java" target-dir="src/com/radiusnetworks/ibeacon/service" />
<source-file src="src/android/com/radiusnetworks/ibeacon/simulator/BeaconSimulator.java" target-dir="src/com/radiusnetworks/ibeacon/simulator" />
<source-file src="src/android/com/radiusnetworks/ibeacon/simulator/StaticBeaconSimulator.java" target-dir="src/com/radiusnetworks/ibeacon/simulator" />

<source-file src="libs/android/altbeacon.jar" target-dir="libs" framework="true" />
</platform>

</plugin>
2 changes: 1 addition & 1 deletion src/android/IBeaconServiceNotifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Licensed to the Apache Software Foundation (ASF) under one
*/
package com.unarin.cordova.beacon;

import com.radiusnetworks.ibeacon.Region;
import org.altbeacon.beacon.Region;

/*
* Interface for addition iOS events
Expand Down
Loading

0 comments on commit 98d246f

Please sign in to comment.