title: can't enable probe / sensor
body: <p>I am using the <a href="http://code.google.com/p/funf-open-sensing-framework/" rel="nofollow">funf</a> framework in order to get access to the SMS's on the users' phone. </p>
  
  <p>The framework consists of several packages. The provided probes all extend the abstract class Probe. </p>
  
  <p>In order to utilize the framework i have wrote the following class:</p>
  
  <pre><code>package com.senseapp.dieselboris;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.widget.TextView;
  
  
  public class SenseAppV1Activity extends Activity {
      private long p;
      private String message;
      private boolean r; 
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          SMSmessage sp = new SMSmessage();
          r = sp.isRunning();
          sp.enable();
          p = sp.getDefaultPeriod();
  
          message = Boolean.toString(r);
  
          TextView tv = new TextView(this);
          tv.setText(message);
          setContentView(tv);
  
      }
  }
  </code></pre>
  
  <p>Because the methods of the the class SMSProbe are declared protected i wrote the SMSmessage class: </p>
  
  <pre><code>package com.senseapp.dieselboris;
  
  import edu.mit.media.funf.probe.*;
  import edu.mit.media.funf.probe.builtin.*;
  import edu.mit.media.funf.probe.builtin.ProbeKeys.AndroidInternal.Sms;
  
  public class SMSmessage extends SMSProbe {
  
      protected String getDataName () {
          return super.getDataName();
  
      }
  
      protected long getDefaultPeriod () {
          return super.getDefaultPeriod();
      } 
  
      protected String getDateColumnName () {
          return super.getDateColumnName();
      }
  
  
  }
  </code></pre>
  
  <p>but when i run this code it fails when it should turn on the probe, see this error:</p>
  
  <pre><code>&lt;small&gt;
   java.lang.RuntimeException: Unable to start activity ComponentInfo{com.senseapp.dieselboris/com.senseapp.dieselboris.SenseAppV1Activity}: java.lang.NullPointerException
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2787)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
       at android.app.ActivityThread.access$2300(ActivityThread.java:135)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:144)
       at android.app.ActivityThread.main(ActivityThread.java:4937)
       at java.lang.reflect.Method.invokeNative(Native Method)
       at java.lang.reflect.Method.invoke(Method.java:521)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
       at dalvik.system.NativeStart.main(Native Method)
   Caused by: java.lang.NullPointerException
       at android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:271)
       at edu.mit.media.funf.probe.Probe.sendProbeStatus(Probe.java:280)
       at edu.mit.media.funf.probe.Probe.sendProbeStatus(Probe.java:227)
       at edu.mit.media.funf.probe.Probe.enable(Probe.java:612)
       at com.senseapp.dieselboris.SenseAppV1Activity.onCreate(SenseAppV1Activity.java:20)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)
  
  
  &lt;/small&gt;
  </code></pre>
  
  <p>the method enable() in the abstract class Probe:</p>
  
  <pre><code>public final void enable() {
          if (!enabled) {
              Log.i(TAG, "Enabling probe: " + getClass().getName());
              enabled = true;
              running = false;
              sendProbeStatus();
              onEnable();
          }
      }
  </code></pre>
  
  <p>What do i do wrong? since my class SMSmessage eventually inherits from Probe this is valid I thought.</p>
  
  <p>I hope one of the developers of Funf reads this.   </p>
  
  <p>Thank you.</p>