Android app crashing at starup
<p>I have written a quick android add to display the SSID of the wifi network connected to along with the device ip address. the code is:    </p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Context context = getApplicationContext();
        WifiManager wifi_man = (WifiManager)context.getSystemService(Context.WIFI_SERVICE);

        if(wifi_man.isWifiEnabled()==true)
        {
            System.out.println("inwifi");
            WifiInfo wifi_info = wifi_man.getConnectionInfo();
            String ssid_name = wifi_info.getSSID();

            TextView temp = (TextView)findViewById(R.id.widget40);
            CharSequence sentence = "SSID NAME : "+ssid_name;
            temp.setText(sentence);

            int temp2 = wifi_info.getIpAddress();
            String ip_addr = Formatter.formatIpAddress(temp2);
            temp = (TextView)findViewById(R.id.widget41);
            CharSequence sent = "IP ADDRESS : "+ip_addr;
            temp.setText(sent);

        }
    }    
</code></pre>

<p>however the app process crashes as soon as it starts ... any idea why. also i am confused as to the entry point into my code. do i just put my apps code at the end of the onCreate process?</p>
