Navigating the web
The debate about whether natively compiled or JavaScript-based web mobile apps are better seems to be over. Native mobile apps such as those built with Delphi, C++Builder, or Xcode are the most common choice for developers. However, sometimes it makes a lot of sense to combine these two different worlds and create a hybrid solution where an app is still native, but also embeds a web browser.
Luckily in FireMonkey, there is a special TWebBrowser
component that makes it easy to embed web-browsing functionality in your app:
- Create a blank multi-device application. Save the form as
uFormWebBrowser
and the project asWebBrowserApp
. - Drop a toolbar component on the form. Drop a
TEdit
component on the toolbar and rename it toEdtURL
. It will contain a URL for the web browser component to navigate to. For convenience, you can already put a valid URL into theText
property of the edit, so it is faster at runtime to check that our app is working correctly. This...