title: get activityInfo metaData in onCreate method
body: <p>I need to retrieve a value from the <code>AndroidManifest.xml</code> file, stored as a meta data:</p>
  
  <pre><code>&lt;meta-data android:value="3" android:name="myInterestingValue" /&gt;
  </code></pre>
  
  <p>In the <code>onCreate</code> method, I call the following method:</p>
  
  <pre><code>private Object getMetaData(String name) {
      try {
          ActivityInfo ai = getPackageManager().getActivityInfo(this.getComponentName(), PackageManager.GET_META_DATA);
          Bundle metaData = ai.metaData; 
          if(metaData == null) {
              debug("metaData is null. Unable to get meta data for " + name);
          }
          else {
              Object value = (Object)metaData.get(name);
              return value;
          }
      } catch (NameNotFoundException e) {
          e.printStackTrace();
      }
      return null;
  }
  </code></pre>
  
  <p>But the <code>metaData</code> is always null. Is it impossible to access the <code>metaData</code> in the <code>onCreate</code> method? i.e. The activity has not been fully initialized yet.</p>