How to open Youtube app main activity
<p>I am trying to open the MainActivity of YouTube app using the code below.</p>

<pre><code>             Intent intent = new Intent(Intent.ACTION_MAIN);
             intent.setPackage("com.google.android.youtube");
             intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
             startActivity(intent);
</code></pre>

<p>The problem is that the code above work fine when the Youtube app is updated to last version, but fail when the user have an old version of Youtube.</p>

<p>How can I open the YouTube main activity without to care what version the user have?</p>
