Why application doesn't work after run
<p>I'm newbie in Android and I have problem with this source code.
When I want to run application application shut down. Where is the problem can you help me ???</p>

<p>Here is a code:</p>

<pre><code>public class PhoneDiagnosticsActivity extends Activity {
TelephonyManager tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button btnStart = (Button)findViewById(R.id.btnStart);
btnStart.setOnClickListener(new View.OnClickListener() {
public void onClick(View arg0) {
BluetoothConnection bc = new BluetoothConnection();
bc.createConnection();
}
});
}
 public String writeXMLString(){
code with XML writer
}
</code></pre>

<p>Thank you </p>
