I'm working on an app based on WebView. The main goal is to watch YouTube videos. My issue is that I'm not able to see the videos on a fullscreen mode but I have to open the YouTube app... Can anyone help me please?
This is my code:
public class MainActivity extends Activity {
private WebView mWebView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mWebView = (WebView) findViewById(R.id.activity_main_webview);
WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
mWebView.loadUrl("http://www.example.com");
}
}