0

I am trying to show direct search result activity to webWiew

private YouTubePlayerView youTubeView;


youtubeVideoUrl = "https://m.youtube.com/results?q="+urlQuery;

but activity displays black page. I want to whenever somebody click any video thumbnail just catch the url and play in YouTube Player.

I have used

@Override  
 public boolean shouldOverrideUrlLoading(WebView view, String url) { 
     youTubeView.initialize(YOUTUBE_API_KEY, this);               
 } 

enter image description here

  • If you only return `super.shouldOverrideUrlLoading(view, url)` then why do you override the method at all? – Bö macht Blau Apr 11 '18 at 18:25
  • oh! i forgot this. Please see it again. When i clicked on any video of youtube search result the method 'shouldOverrideUrlLoading' was bypassed. – Ankit Kumar Apr 11 '18 at 18:58

0 Answers0