Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Cubeacon committed Aug 8, 2018
1 parent f88ca0c commit b4bd97e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/app.iml
Expand Up @@ -88,6 +88,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/build-info" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/eyro/cubeacon/demos/App.java
Expand Up @@ -40,7 +40,7 @@ public void onCreate() {
// setup region scanning when OS boot completed
CBBootstrapRegion.setup(this,
new CBRegion("com.eyro.cubeacon.bootstrap_region",
UUID.fromString("cb10023f-a318-3394-4199-a8730c7c1aec")));
UUID.fromString("cb10023f-a318-3394-4199-a8730c7c1aec"), 1234, 5678));
}

public void showNotification(String title, String message) {
Expand Down
Expand Up @@ -22,6 +22,7 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;

public class RangingActivity extends AppCompatActivity implements CBRangingListener, CBServiceListener, AdapterView.OnItemClickListener {

Expand Down Expand Up @@ -99,7 +100,7 @@ public void didRangeBeaconsInRegion(final List<CBBeacon> beacons, CBRegion regio
for (CBBeacon beacon : beacons) {
title = beacon.getProximityUUID().toString().toUpperCase();
subtitle = String.format(Locale.getDefault(), "M:%d m:%d RSSI:%d Accuracy:%.2fm",
beacon.getMinor(), beacon.getMinor(), beacon.getRssi(), beacon.getAccuracy());
beacon.getMajor(), beacon.getMinor(), beacon.getRssi(), beacon.getAccuracy());
map = new HashMap<>();
map.put("title", title);
map.put("subtitle", subtitle);
Expand All @@ -124,7 +125,8 @@ public void onBeaconServiceConnect() {
cubeacon.addRangingListener(this);
try {
// create a new region for ranging beacons
CBRegion region = new CBRegion("com.eyro.cubeacon.ranging_region");
CBRegion region = new CBRegion("com.eyro.cubeacon.ranging_region",
UUID.fromString("cb10023f-a318-3394-4199-a8730c7c1aec"), 1234, 5678);
// start ranging beacons using region
cubeacon.startRangingBeaconsInRegion(region);
} catch (RemoteException e) {
Expand Down

0 comments on commit b4bd97e

Please sign in to comment.