title: Android getContentResolver() is undefined for getting AndroidID
body: <p>I am trying to get Android's device Id in my class and a function will use it. When I try to use like below, it says 'The method getContentResolver() is undefined'
  How to fix it do you have any idea ?      </p>
  
  <p><strong>Update:</strong></p>
  
  <pre><code>public class DatabaseHandler extends SQLiteOpenHelper {
      // db version
      private static final int DATABASE_VERSION = 1;
      // db name
      private static final String DATABASE_NAME = Secure.getString(getContentResolver(), Secure.ANDROID_ID);
  
  
      // constructor
      public DatabaseHandler(Context context) {
          super(context, DATABASE_NAME, null, DATABASE_VERSION);
      }
  
  }
  </code></pre>