I covered this previously in a few webinars and presentations, but never published the source code for WebBroker on Android. To be honest I hadn’t tested it with C++Builder before, but I completely expected it to work, and it did. I also updated the tests on Emteria.OS (FKA RTAndroid) and it also works there.
The process of porting a Delphi or C++Builder WebBroker project to Android is pretty straight forward, but I’m publishing the code anyway. You create a Windows FMX WebBroker project, then copy all the code into a regular FireMonkey project. You will need to copy a few files from the RTL folder locally so you can reference them since they aren’t included in the Android package.
- Web.WebReq.pas
- Web.WebBroker.pas
- Web.WebConst.pas
- IdHTTPWebBrokerBridge.pas
- IdCompilerDefines.inc
- For C++Builder you also need
- Web.WebReq.hpp
- Web.WebBroker.hpp
- Web.WebConst.hpp
- IdHTTPWebBrokerBridge.hpp
Here are the links for the Delphi and C++Builder projects. They were built and tested in with 10.3.1 Rio. I also compiled some updated details on how to build the project and how to install and test on Emteria.OS.
I mention this in the slide deck, but officially WebBroker isn’t supported on Android. I tested it, and it seems to work, but if you run into an instance where it doesn’t work as expected, then you are on your own. Please don’t contact support and tell them I said it should work. Thanks!
Previous webinars:
Slides
Slides
See also: Targeting Chrome OS with Delphi via Android and Linux
2 replies on “WebBroker on Android and Raspberry Pi 3”
We really need ASAP a linux compiler for raspberry PI (and family). Android is not a natural election for raspberry pi and perform very bad. Limit a lot that you can do. The api is so incompatible between versions. Android is only suitable for experiments, in the case of raspberry PI. never ready to deploy a comercial solution. Please release a linux compiler for raspberry PI!
Looks a bit like something I did a while back:
https://github.com/DelphiWorlds/MultiPlatformWebServer
🙂