review of example '.android-ssl-test'

This commit is contained in:
pls.153 2024-11-23 08:21:01 +01:00
parent e976c75b0e
commit 3bc114a244
3 changed files with 13 additions and 8 deletions

View file

@ -1,10 +1,5 @@
(in-package :app) (in-package :app)
#+android
(when (probe-file "libssl.so")
(ffi:load-foreign-library "libcrypto.so")
(ffi:load-foreign-library "libssl.so"))
(defun ini () (defun ini ()
(q> |text| ui:*label* (q> |text| ui:*label*
(first (last (multiple-value-list (drakma:http-request "https://duckduckgo.com")))))) (first (last (multiple-value-list (drakma:http-request "https://duckduckgo.com"))))))

View file

@ -2,13 +2,22 @@ import QtQuick 2.15
import QtQuick.Controls 2.15 import QtQuick.Controls 2.15
Item { Item {
id: main
width: 300 width: 300
height: 500 height: 500
Image {
anchors.centerIn: parent
anchors.horizontalCenterOffset: 5
source: "https://common-lisp.net/static/imgs/lisplogo_flag2_128.png"
}
Label { Label {
objectName: "label" objectName: "label"
anchors.bottom: main.bottom
anchors.bottomMargin: 20
anchors.horizontalCenter: main.horizontalCenter
text: "downloading..." text: "downloading..."
anchors.centerIn: parent
font.pixelSize: 24 font.pixelSize: 24
font.bold: true font.bold: true
} }

View file

@ -1,4 +1,4 @@
This is here for testing SSL on android. This is here for testing SSL on android, both on **Lisp** and on **Qt** side.
After doing `make apk`, please ensure files After doing `make apk`, please ensure files
``` ```
@ -16,4 +16,5 @@ before installing this one.
When running the app, it should first display "downloading...", and after a few When running the app, it should first display "downloading...", and after a few
seconds (if the android device is connected to the internet), it should display seconds (if the android device is connected to the internet), it should display
"OK". "OK" (Lisp side of SSL); it should also display a Lisp logo, downloaded through
https (Qt side of SSL).