Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launch Chrome in fullscreen mode

I'm launching Chrome from an Android App and I want this looks like I'm not leaving the app... for this I do launch chrome from an Intent in this way:

public void onClickApp(View view){
Intent intent = new Intent("android.intent.action.MAIN");
intent.setComponent(ComponentName.unflattenFromString("com.android.chrome/com.android.chrome.Main"));
intent.addCategory("android.intent.category.LAUNCHER");
intent.setData(Uri.parse("http://google.com"));
startActivity(intent);
}

But I don't know how to hide the top bar, also would be great to start it "on private". There's a way to achieve this?

like image 278
Felix Avatar asked Oct 21 '22 23:10

Felix


1 Answers

This won't be possible. The only way Chrome for Android can be put in a fullscreen mode is use the Fullscreen API: http://www.html5rocks.com/en/mobile/fullscreen/

However this requires user interaction to get the UI in fullscreen mode, which isn't quite what you want.

The WebView now uses Chrome as the rendering engine in KitKat: https://developers.google.com/chrome/mobile/docs/webview/overview

like image 185
Matt Gaunt Avatar answered Nov 02 '22 10:11

Matt Gaunt