dwindows for Android lazarus / 43-Android ---------------------------------------------------------------------- PierceNg · 2022-12-16 12:25 Continuing from the 'GTK3 proposal' thread, another baby step taken! I've now gotten my littlest demo to run on Android, on emulator and phone. Emulator screenshot attached. Some notes: - Android Studio uses Gradle as its build system. For 'native' projects, Gradle calls CMake. I can't quite get CMake to run FPC cross compiler from within Android Studio yet. So I build the Pascal shared library using shell script, then have CMake incorporate the shared library into the final artefact. - For 32-bit ARM, the Gnu binutils cross linker is not able to produce the Pascal shared library: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Assembling dwindowsAssembling dwprunnerLinking armeabi-v7a/libdwprunner.so/home/pierce/pkg/cross/arm-linux- androideabi/bin/arm-linux-androideabi-ld.bfd: error: source object /ho me/pierce/pkg/android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/li nux-x86_64/sysroot/usr/lib/arm-linux-androideabi/29/crtbegin_so.o has EABI version 5, but target armeabi-v7a/libdwprunner.so has EABI version 0  But: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i % file *.odwindows.o:  ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not strippeddwprunner.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not strippedSo I have no idea what's happening here. I'll look into iOS next. Edit: iOS thread here: https://forum.lazarus.freepascal.org/index.php/topic,61621.0.html ---------------------------------------------------------------------- PierceNg · 2024-04-19 08:54 Coming back to this after a (long) break, I've now built a demo/exercise app using a webview widget for the user interface, with bidirectional Javascript-Pascal in-process RPC. The main body of the code loads in-app static content, then binds the names 'HostSayHello' and 'HostExit' for callback to Pascal code from Javascript. Said Pascal code in turns invokes Javascript to manipulate the DOM. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   webwidget := dw_html_new(1001); // 1001 is an identifier  if webwidget <> nil then    begin      dw_box_pack_start(mainwindow, webwidget, 0, 0, DW_TRUE, DW_TRUE, 0);      dw_html_url(webwidget, 'file:///android_asset/index.html');      dw_html_javascript_add(webwidget, 'HostSayHello');      dw_html_javascript_add(webwidget, 'HostExit');      dw_signal_connect(webwidget, DW_SIGNAL_HTML_MESSAGE, @html_message_callback, nil);    end; Screenshot of the app running in Android emulator attached.