Android Support in TTMSFMXWebGMaps & TTMSFMXWebOSMaps


The technique behind running a TTMSFMXWebGMaps and TTMSFMXWebOSMaps on Android involves adding a JavaScript interface class that acts as a communication bridge between the webbrowser client instance and the running map HTML and JavaScript. Up until API level 17 all the JavaScript interface bridge class methods and properties were accessible via JavaScript. From API level 17 this has changed to allow only the methods and properties that were decorated with the @JavaScriptInterface annotation. Unfortunately, there isn't an out of the box solution provided in the Android API/compiler available in the latest RAD Studio, so we needed to search for an alternative solution. This solution is explained in steps below and involves adding a jar file that provides a modified JavaScript interface class.

When starting an application with an instance of TTMSFMXWebGMaps or TTMSFMXWebOSMaps for Android, you will get an error indicating the JJavaScriptHelper class could not be found. The JJavaScriptHelper class is required for running your application on Android.


To fix the above error, and have your application running for Android, please follow the steps below.
  1. Navigate in your project to the Android target, open and right-click on the Libraries node.
  2. Select, "Add"

  3. Navigate to the installation directory and locate the "Android Support" folder.
  4. Select the JavaScriptHelper.jar file from the JavaScriptHelper sub folder and add it to your project.

  5. Clean, Rebuild and run your project to have your application running on Android.