Skip to content

Commit

Permalink
updated geofencer to properly use accepted location probes
Browse files Browse the repository at this point in the history
  • Loading branch information
h0pbeat committed Jan 9, 2016
1 parent bde3773 commit c15ff36
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions funf_v4/src/main/java/edu/mit/media/funf/data/Geofencer.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ public class Geofencer {


private Set<String> acceptedLocationProbes =
new HashSet<String>(Arrays.asList("edu.mit.media.funf.probe.builtin.LocationProbe", "edu.mit.media.funf.probe.builtin.SimpleLocationProbe"));


new HashSet<String>(Arrays.asList("edu.mit.media.funf.probe.builtin.LocationProbe",
"edu.mit.media.funf.probe.builtin.SimpleLocationProbe"));

public Geofencer() {
Log.i(LogUtil.TAG, "Creating geofencer " + version);
Expand All @@ -68,7 +67,7 @@ public boolean shouldFire(String name) {

private void updateVisits(String name, IJsonObject data) {

if (name.equals("edu.mit.media.funf.probe.builtin.LocationProbe")) {
if (acceptedLocationProbes.contains(name)) {
Double accuracy = data.get("mAccuracy").getAsDouble();
Double lat = data.get("mLatitude").getAsDouble();
Double lon = data.get("mLongitude").getAsDouble();
Expand Down

0 comments on commit c15ff36

Please sign in to comment.