title: Adding a list of scan results from Wifi to an intent and retrieving from a broadcast receiver?
body: <p>I want to add a list as a parameter to pass into an intent and then receive it from a broadcast listener, but I'm having some trouble.  I cannot figure out how to put this List into the Intent as an extra, or retrieving the list from it. I can get into the broadcast receiver. </p>
  
  <pre><code>//In my Main File: Everthing is registered and working. 
  IntentFilter startUsingScanResults = new IntentFilter("StartUsingScanResults");
  c.registerReceiver(serviceConsume.ScanResultReceiver, startUsingScanResults); 
  
  List&lt;ScanResult&gt; scanResults = Some values; 
  Intent intent = new Intent();
  intent.setAction("StartUsingScanResults");
  
  // Then Need to put the List&lt;ScanResults&gt; into the intent.
  // ie: intent.putExtra("MyResults", scanResults);
  
  Context.sendBroadcast(intent);
  </code></pre>
  
  <p>// My broadcast receiver that should have the list inside it. </p>
  
  <pre><code>    public BroadcastReceiver ScanResultReceiver = new BroadcastReceiver() {
  
          @Override
          public void onReceive(Context context, Intent intent) {
  
              Bundle extras = intent.getExtras();
  
              // Need something here to get the list 
              // ie: List&lt;ScanResult&gt; scanResults = extras.getBundle("MyResults"); 
  }
  };
  </code></pre>
  
  <p>Hopefully I am clear with this question. I just need to put the list into and get the List from the bundle (or intent).</p>
  
  <p>A ScanResult is in the format of ["","","","","","",""] if that helps. So I guess it might be similar to a multidimensional array. </p>
  
  <p>Any help is appreciated! Thanks</p>