Android Activity.getParent() always returning null
<p>I have this little function here:</p>

<pre><code>public Activity getRootActivity()
{
    Activity a = this;
    while (a.getParent() != null)
        a = a.getParent();
    return a;
}
</code></pre>

<p>But a.getParent() always returns null.  It doesn't seem to matter how deep into my UI I go, it will always return null.  </p>

<p>Anybody have any idea as to why?</p>

<p><strong>EDIT</strong></p>

<p>Here is how I am starting Activities (within other activities)</p>

<pre><code>startActivity(new Intent(this, activityname.class));
</code></pre>

<p>Apparently that means I'm not 'embedding' them? How does one 'embed' them?</p>
