title: Android FUNF open sensing framework v0.4 - how to change probe schedule at runtime
body: <p>I would like to be able to start/stop probes dynamically - similar to the FUNF Journal app - and also to alter the configuration of the probes (interval, duration) at runtime. I managed to start/stop the probes, as shown in the <a href="https://code.google.com/p/funf-open-sensing-framework/wiki/WifiScannerTutorial" rel="nofollow">Funf Wifi scanner tutorial</a>. To change the configuration I tried to hand over a JSON object containing the schedule and type of the probe but the schedule seems to be ignored.</p>
  
  <pre><code>JsonObject config = new JsonObject();
  
          Schedule.BasicSchedule schedule = new BasicSchedule();  
          schedule.setDuration(new BigDecimal(duration));
          schedule.setInterval(new BigDecimal(period));
  
          JsonObject scheduleJsonObject = mFunfManager.getGson().toJsonTree(schedule).getAsJsonObject();
          scheduleJsonObject.remove(TYPE);
  
          config.add("@schedule", scheduleJsonObject);
          config.addProperty("@type", "edu.mit.media.funf.probe.builtin.AccelerometerSensorProbe");
  
          AccelerometerSensorProbe accelerometerProbe = mFunfManager.getGson().fromJson(config, AccelerometerSensorProbe.class);
          accelerometerProbe.registerPassiveListener(MainActivity.this);
  </code></pre>
  
  <p>Thanks for your help!</p>