How to compile qt mysql driver for android?
-
wrote on 16 Apr 2017, 19:10 last edited by
I want create app for android system which connect with database.
How to compile qt mysql driver for android? -
Hi,
Please search the forum a bit. This question has been asked many times already.
See this wiki entry.
Also note that there might be security implication and that you might want to rather implement a REST interface to talk with your database.
-
wrote on 17 Apr 2017, 15:28 last edited by
Thanks for your anwser
-
wrote on 17 Apr 2017, 15:44 last edited by
Maybe this is not you want.
I be opposed to this network: Android [MySQL client] ---> MySQL Server.
I will use this network: Android [HTTP Client] --->Restful API [Python Server] ---> MySQL Server. Everything will be over HTTP or WebSocket, so mobie apps will just need HTTP Client and WebSocket Client, which has already supportd in Android and IOS. -
wrote on 17 Apr 2017, 16:32 last edited by
Do you mean that i should use REST API?
My app -> PHP script -> MySQL database -
wrote on 17 Apr 2017, 17:16 last edited by
I must create php script and connect with server by rest api, like this:
https://askubuntu.com/questions/544842/how-to-get-data-from-rest-api-with-qml-for-ubuntu-touch-app
?
AJAX etc? -
wrote on 18 Apr 2017, 10:29 last edited by
Hi @Pyroxar,
you can easily access REST APIs from your Javascript/QML code with the XmlHttpRequest Element.
V-Play Engine also provides some open-source examples (e.g. Twitter demo, PropertyCross demo) that use http-requests to fetch data from the twitter or property-cross API:
Cheers,
GT -
wrote on 18 Apr 2017, 10:33 last edited by Pyroxar
@GTDev
I wanted use XmlHttpRequest Element.
but i have:
QSslSocket: cannot resolve SSLv2_server_method
on my ubuntu and android app.If i will use V-Play i will nnot have an error?
https://forum.qt.io/topic/78345/qsslsocket-cannot-resolve-sslv2_server_method-ubuntu-and-android -
wrote on 18 Apr 2017, 15:45 last edited by GTDev
You are probably missing required SSL libraries to make https:// calls (you can verify this by testing if XMLHttpRequest works with URLs that do not use https).
SSL on linux should work right away if you make sure the SSL libs are installed.
For Android, it is currently needed to manually package the SSL library as described here: http://doc.qt.io/qt-5/opensslsupport.html
With V-Play you can avoid having to build and provide SSL for Android, V-Play has SSL already bundled since version 2.10.0.Cheers,
GT
6/10