Displaying the result of a wifi scan in another activity
<p>I want to display the scan result of a wifi scan in other activity , but the way I'm doing it makes my application crashes , can anyone help me display the scan result in other activity?
// this is the code of the activity on which I wanna display The scan result</p>

<pre><code>    package com.example.wizerv1;

import java.util.ArrayList;

import android.net.wifi.ScanResult;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

public class AP_list extends Activity {

Wizer wifi;
CustomReceiver rcv; 
TextView t1;
ListView list;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_ap_list);

    t1=(TextView)findViewById(R.id.textView1);


     list = (ListView) findViewById(R.id.listView1);
ArrayList&lt;String&gt; AP=new ArrayList&lt;String&gt;();
for (ScanResult result : rcv.results)
{
    AP.add("AP :"+result.SSID);

}

 ArrayAdapter&lt;String&gt; adp = new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1,AP);
   list.setAdapter(adp);


}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.activity_ap_list, menu);
    return true;
}

}
</code></pre>
