Android Funf framework - custom Probe no data received in ConfiguredPipeline
<p>I am trying to build an Android application with the <a href="http://funf.org/" rel="nofollow">Funf Framework</a>. I wrote a custom Probe (DownloadProbe), which measures a couple of things. When the Framework calls the following function in my custom Probe to get the gathered data</p>

<pre><code>@Override
public void sendProbeData() {
    Log.i("DownloadProbe", "sendProbeData called...");
    ArrayList&lt;DownloadResult&gt; notNullResults = new ArrayList&lt;DownloadResult&gt;();

    for(DownloadResult current : measurements){
        Log.i("DownloadProbe", current.toString());
        if(current != null){
            notNullResults.add(current);
        }
    }

    Bundle data = new Bundle();
    data.putParcelableArrayList(DOWNLOAD_RESULTS, notNullResults);
    sendProbeData(Utils.getTimestamp(), data);
    Log.i("DownloadProbe", "sendProbeData done");
}
</code></pre>

<p>It is being executed properly. When I debug I can see the Bundle object contains the information I would like to extract. in the Bundle object there is:<br>
mMap which contains KEY = ArrayList<br>
and ParcelledData = null</p>

<p>As far as I can tell my DownloadResult Class implements the Parcelable Interface correctly:</p>

<pre><code>public class DownloadResult implements Parcelable{

    public static final Creator&lt;DownloadResult&gt; CREATOR = new DownloadResultCreator(); 

    public boolean successful;
    public int timeToDL;


    public DownloadResult(boolean successful, int timeToDL) {
        this.successful = successful;
        this.timeToDL = timeToDL;
    }

    @Override
    public int describeContents() {
        // Not used since not necessary
        return 0;
}

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeBooleanArray(new boolean[] {this.successful}); 
        dest.writeInt(this.timeToDL);
    }

    public String toString(){
        return "Successful: " + successful + " Time to download: " + timeToDL;
    }

}
</code></pre>

<p>And the according Creator Class:</p>

<pre><code>public class DownloadResultCreator implements Creator&lt;DownloadResult&gt; {

    @Override
    public DownloadResult createFromParcel(Parcel source) {
        Log.i("DownloadResultCreator", "start creating Parcel...");
        boolean[] rsltSuccess = new boolean[1];
        source.readBooleanArray(rsltSuccess);
        int dlTime = source.readInt();
        //Location location = source.readParcelable(Location.class.getClassLoader());
        DownloadResult result = new DownloadResult(rsltSuccess[0], dlTime);

        Log.i("DownloadResultCreator", "object created: " + result);

        return result;
    }

    @Override
    public DownloadResult[] newArray(int size) {
        return new DownloadResult[size];
    }

}
</code></pre>

<p>On the ConfiguredPipeline this should be received here(as it does with the builtin Probes):</p>

<pre><code>@Override
public void onDataReceived(Bundle data) {
    Log.i(this.toString(), "TEST " + data.getParcelableArray(DownloadKeys.DOWNLOAD_RESULTS)); // mentioned in Update(1)
    Log.i(this.toString(), "received data " + data.toString());
    super.onDataReceived(data);
    Log.i(this.toString(), "onDataRecieved called");
    incrementCount();
    Log.i(this.toString(), "incrementCount called");
}
</code></pre>

<p>The Bundle object received here contains<br>
mMap = null<br>
ParcelledData = some object reference (android.os.Parcel@41312500)</p>

<p>When the Framework is being used with a builtin probe, this works just fine. My guess is that with the custom Probe the Bundle content is somehow not being unmarshalled/unparceled.</p>

<p><strong>Update(1):</strong> When I call .getParcelableArray(KEY) on the Bundle received in onDataReceived get the following Log message: </p>

<blockquote>
  <p>Key DOWNLOAD_RESULTS expected Parcelable[] but value was a
  java.util.ArrayList.  The default value  was returned.</p>
</blockquote>

<p>The strange thing about it is, after this, the Bundle is in the correct form:<br>
mMap which contains KEY = ArrayList<br>
and ParcelledData = null<br>
But the information is still not being stored into the database.</p>
