0

I need to create a simple app that acts like a launcher and keeps the chrome browser (must be chrome due to heavy HTML5) as main app with a certain url with a device that runs Android 4.2 and cannot be upgraded neither rooted. Best would be if I could embed the chrome browser frame and hide all controls.

I already managed to write launcher apps with XE6 which minimize the risk of accidently leaving the app by interception "back" and being the default home app.

I know of the CEF in Windows, is there something similar under android?

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
MichaSchumann
  • 1,361
  • 1
  • 17
  • 36

2 Answers2

2

The FMX mobile browser component TWebBrowser is a wrapper around the native platform browser. On Android that means it wraps WebView which is a modern WebKit browser with HTML 5 support.

So, it seems to me that the obvious way forward is to use TWebBrowser. From what you've described of your app, however, it might be simpler to code it in Java. It would certainly be more lightweight and you'd be sure to have easy access to all WebView functionality.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
2

WebView wraps Android WebKit before Android 4.4. With Android 4.4 and newer WebKit wraps Chromium. For your 4.2 device limited HTML5 support is already available in WebKit.

Some advices are collected on http://blog.guya.net/2013/10/24/the-pains-and-remedies-of-android-html5/

If I skip all advices which are for pre 4.2 devices, the remaining list of issues and remedies is quite short.

  • None of the parents HTML elements to the canvas should have overflow: hidden or overflow:scroll
  • Wait a few (~100 millisecond) after the DOM is ready to ask it what’s the window size is.
  • Styling text-inputs that has focus: https://stackoverflow.com/a/9464837
Community
  • 1
  • 1
mjn
  • 36,362
  • 28
  • 176
  • 378