title: Opening youtube links gives activityNotFound Error Android
body: <p>So i have made an app that has the best youtube videos to learn programming.</p>
  
  <p>So youtube has two ways to gives its links,</p>
  
  <p>For example:</p>
  
  <p>The full link : <a href="https://www.youtube.com/watch?v=QwS1r1mc888" rel="nofollow noreferrer">https://www.youtube.com/watch?v=QwS1r1mc888</a>
   and</p>
  
  <p>The shortened link : <a href="https://youtu.be/QwS1r1mc888" rel="nofollow noreferrer">https://youtu.be/QwS1r1mc888</a></p>
  
  <p>now i have stored all the video links in the firebase database, i have saved all the shortened video links, now on my play console i notices people are getting ActivityNotFound Errors when they try to open these links.</p>
  
  <p>The code i have used to open the video :</p>
  
  <pre><code>Intent i = new Intent(Intent.ACTION_VIEW);
  i.setData(Uri.parse(currentUrl));
  startActivity(i);
  </code></pre>
  
  <p>Now even the people who have browsers and youtube installed are getting this error/exception. So what should i do ? will storing the whole links help or using shortened link and full links in the same thing ?</p>
  
  <p>How do i overcome this error ?</p>