Reputation: 619
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?
Upvotes: 5
Views: 10515
Reputation: 619
Actually the best chance is to use ChromeView or Chromium-View (i did use the last, but the project has been deleted by its author), good luck!
Upvotes: 0
Reputation: 9821
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
Upvotes: 3