title: Having issues with ANDROID_ID
body: <p>I'm trying to get ANDROID_ID working in my appn but I'm getting odd behavior in my emulator and also on hardware.</p>
  
  <p>an extract from my app.</p>
  
  <pre><code>import android.provider.Settings.Secure;
  
  public class RssActivity extends ListActivity {
  
  final String android_id = Secure.getString(getContentResolver(),Secure.ANDROID_ID); 
  
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      Log.d("UUID", android_id);
  </code></pre>
  
  <p>Now in my emulator the app opens but then seems to freeze and does nothing, I don't even get my "UUID" debug message.</p>
  
  <p>On my phone i just get a <code>"the application has stopped unexpectedly" OS 2.3.3</code></p>
  
  <p>Any ideas, am i implementing this wrong?</p>
  
  <p>If i remove <code>"final String android_id = Secure.getString(getContentResolver(),Secure.ANDROID_ID);"</code> then the app works fine on both emulator and hardware - so the problem must be located here?</p>