title: Error in the sample code "bluetooth chat"
body: <p>i m trying to run the bluetooth chat sample from the developers site but it cant be run..i create a new project from existing source,i opens but it contains lots of errors..any idea please??? <a href="http://developer.android.com/resources/samples/BluetoothChat/index.html" rel="nofollow">http://developer.android.com/resources/samples/BluetoothChat/index.html</a></p>
  
  <p>i replaced the "match_parent" with "fill_parent", and now the console message is:</p>
  
  <pre><code>[2011-03-24 13:29:17 - BluetoothChat] W/ResourceType( 5892): Bad XML block: header size 60 or total size 3932356 is larger than data size 0
  [2011-03-24 13:29:17 - BluetoothChat] C:\Users\kostas\Desktop\BluetoothChat\res\menu\option_menu.xml:17: error: No resource identifier found for attribute 'showAsAction' in package 'android'
  [2011-03-24 13:29:17 - BluetoothChat] C:\Users\kostas\Desktop\BluetoothChat\res\menu\option_menu.xml:21: error: No resource identifier found for attribute 'showAsAction' in package 'android'
  [2011-03-24 13:29:17 - BluetoothChat] C:\Users\kostas\Desktop\BluetoothChat\res\menu\option_menu.xml:25: error: No resource identifier found for attribute 'showAsAction' in package 'android'
  </code></pre>
  
  <p>i erased the line   <code>android:showAsAction="ifRoom|withText"</code> in the option_menu.xml , and now there is no message in the console..there is red error in the bluetoothchat.java :  </p>
  
  <pre><code>private final void setStatus(int resId) {
          final **ActionBar** actionBar = **getActionBar()**;
          actionBar.setSubtitle(resId);
      }
  
      private final void setStatus(CharSequence subTitle) {
          final **ActionBar** actionBar = getActionBar();
          actionBar.setSubtitle(subTitle);
      }
  </code></pre>
  
  <p>and in bluetoothChatServise:</p>
  
  <pre><code> public AcceptThread(boolean secure) {
              BluetoothServerSocket tmp = null;
              mSocketType = secure ? "Secure":"Insecure";
  
              // Create a new listening server socket
              try {
                  if (secure) {
                      tmp = mAdapter.listenUsingRfcommWithServiceRecord(NAME_SECURE,
                          MY_UUID_SECURE);
                  } else {
                      tmp = **mAdapter.listenUsingInsecureRfcommWithServiceRecord**(
                              NAME_INSECURE, MY_UUID_INSECURE);
                  }
              } catch (IOException e) {
                  Log.e(TAG, "Socket Type: " + mSocketType + "listen() failed", e);
              }
              mmServerSocket = tmp;
          }
  </code></pre>
  
  <p>and here</p>
  
  <pre><code>public ConnectThread(BluetoothDevice device, boolean secure) {
      mmDevice = device;
      BluetoothSocket tmp = null;
      mSocketType = secure ? "Secure" : "Insecure";
  
      // Get a BluetoothSocket for a connection with the
      // given BluetoothDevice
      try {
          if (secure) {
              tmp = device.createRfcommSocketToServiceRecord(
                      MY_UUID_SECURE);
          } else {
              tmp = **device.createInsecureRfcommSocketToServiceRecord**(
                      MY_UUID_INSECURE);
          }
      } catch (IOException e) {
          Log.e(TAG, "Socket Type: " + mSocketType + "create() failed", e);
      }
      mmSocket = tmp;
  }
  </code></pre>
  
  <p>(the red is between the ** ** )</p>