Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to collect android app data in my local mysql sever??

How to collect android app data in my local mysql sever??

Scheduled Pinned Locked Moved Solved Mobile and Embedded
27 Posts 4 Posters 8.3k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    loogicalrobo
    wrote on last edited by
    #1

    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..

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Did you build the MySQL driver for Android ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • L Offline
        L Offline
        loogicalrobo
        wrote on last edited by loogicalrobo
        #3

        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 me

        Note: The Application I've built runs successfully on windows but it doesn't even open in android.

        jsulmJ 1 Reply Last reply
        0
        • L loogicalrobo

          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 me

          Note: The Application I've built runs successfully on windows but it doesn't even open in android.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          L 1 Reply Last reply
          5
          • jsulmJ jsulm

            @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.

            L Offline
            L Offline
            loogicalrobo
            wrote on last edited by
            #5

            @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..

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              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.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              L 1 Reply Last reply
              3
              • SGaistS SGaist

                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.

                L Offline
                L Offline
                loogicalrobo
                wrote on last edited by loogicalrobo
                #7

                @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!

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Here you have instructions in the Wiki

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  L 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Here you have instructions in the Wiki

                    L Offline
                    L Offline
                    loogicalrobo
                    wrote on last edited by
                    #9

                    @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...

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      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.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      L 1 Reply Last reply
                      0
                      • SGaistS SGaist

                        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.

                        L Offline
                        L Offline
                        loogicalrobo
                        wrote on last edited by
                        #11

                        @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,,

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          You have to build the plugin for your Android Qt. The one you built for Windows can only be used on Windows.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          L 1 Reply Last reply
                          0
                          • SGaistS SGaist

                            You have to build the plugin for your Android Qt. The one you built for Windows can only be used on Windows.

                            L Offline
                            L Offline
                            loogicalrobo
                            wrote on last edited by
                            #13

                            @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 ?

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              What are you trying to build the MariaDB libraries or the Qt MySQL plugin ?

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              L 1 Reply Last reply
                              0
                              • SGaistS SGaist

                                What are you trying to build the MariaDB libraries or the Qt MySQL plugin ?

                                L Offline
                                L Offline
                                loogicalrobo
                                wrote on last edited by loogicalrobo
                                #15

                                @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](0_1485170839498_upload-5a272961-2d3a-4466-af0e-bea985fd559c

                                1 Reply Last reply
                                0
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #16

                                  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.

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  L 1 Reply Last reply
                                  1
                                  • SGaistS SGaist

                                    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.

                                    L Offline
                                    L Offline
                                    loogicalrobo
                                    wrote on last edited by
                                    #17

                                    @SGaist Thank's Here's y screenshot please take a look it
                                    ![alt text](0_1485322557559_upload-fc4700f2-f746-4aa8-a3a4-3acbf69eb75d

                                    1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #18

                                      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.

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      L 1 Reply Last reply
                                      1
                                      • SGaistS SGaist

                                        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.

                                        L Offline
                                        L Offline
                                        loogicalrobo
                                        wrote on last edited by
                                        #19

                                        @SGaist ![alt text] (https://forum.qt.io/uploads/files/1485322568635-upload-fc4700f2-f746-4aa8-a3a4-3acbf69eb75d.png)

                                        jsulmJ 1 Reply Last reply
                                        0
                                        • L loogicalrobo

                                          @SGaist ![alt text] (https://forum.qt.io/uploads/files/1485322568635-upload-fc4700f2-f746-4aa8-a3a4-3acbf69eb75d.png)

                                          jsulmJ Offline
                                          jsulmJ Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on last edited by jsulm
                                          #20

                                          @loogicalrobo Again: you should upload to a image sharing website and post a link to it here.

                                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved