Solved How to collect android app data in my local mysql sever??
-
I have made android app in Qt 5.7 and this app connected with mysql database but whenever i deployed app my android phone , after deploying app my phone database connection is disconnect..
so how to solve this problem please help me.. -
Hi and welcome to devnet,
Did you build the MySQL driver for Android ?
-
Thank's to given me your precious time..
I have used mysql data base plugin driver for connecting database ..but i did'n use any driver for android .if any specific driver for android database please recommended meNote: The Application I've built runs successfully on windows but it doesn't even open in android.
-
@loogicalrobo Is your mobile(!) application going to connect to a remote MySQL server? I wouldn't do it this way. Better would be to provide for example a REST API.
If you really want to access MySQL directly: you will probably have to compile MySQL client library and MySQL Qt plug-in by yourself. -
@jsulm I have no idea,how to compile MySQL client library and MySQL QT plug-in by myself so would you provide some help or resource's regarding this problem..
-
That doesn't answer the point @jsulm brought here and that I brought in numerous similar other threads. Accessing directly a database from a mobile means that if you don't restrict the use of your application on a specific network, you'll have to enable internet facing access to your database server and even if you setup a protected connection (e.g. through SSL) it is usually a bad idea. Hence the: do you really need to access your database directly ? The current thread is to rather have a REST service doing the interface between your application and the database behind.
-
@SGaist Thanks for clarification, SGaist. I see your point that connecting my Android App directly to the MySQL is not a good idea. However, I am new to any other way to connect my Android app with the database. Could you please suggest me where can I find a step by step instruction to connect my app with the database. I'd greatly appreciate any help in that regard.
Thanks a lot.
Cheers! -
-
@SGaist Thank you SGaist. I have seen instruction in wiki as you suggest me..but i have got little more confused.i didn't seem any kind of idea that's how to start make plug-in .Could you please suggest me how to start it...
-
Did you already build the MariaDB library and its dependencies ?
If so, the next step is to get the Qt sources and follow Qt's documentation to build the plugin using the qmake from your Qt for Android installation.
-
@SGaist i have already done mysql plug-in with my Qt and FYI.. my application i have built run on windows it's work fine with database means my application connected with database or even i insert some data (ex:- username and password) in my window application these data insert my database and also reflect on my localhost server ..but when i deploy it's application in my android phone so my database connection is failed or even no data insert in my database,,
-
You have to build the plugin for your Android Qt. The one you built for Windows can only be used on Windows.
-
@SGaist Thank's .I need little bit help actually i confused where Set the following environment variables:
SR=/path/to/android/ndk/platforms/android-9/arch-arm
BR=/path/to/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
these variables set in CMD ? -
What are you trying to build the MariaDB libraries or the Qt MySQL plugin ?
-
@SGaist ! I am building the mariaDB libraries in MSYS console (as you suggested me :/wiki.qt.io/Build_Qt_5_MySQL_Plugin_for_Androidi ) but when i compiling mariaDB client than get this error please refer screenshot
![alt text]( -
The upload functionality is currently broken. Please use an image sharing site and post the link here.
On a side note, there's a script given in the wiki page that should help you get things built.
-
@SGaist Thank's Here's y screenshot please take a look it
![alt text]( -
Again: the upload function from the forum is broken. Use an image sharing website and post the link see here for how to do it.
-
-
@loogicalrobo Again: you should upload to a image sharing website and post a link to it here.