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 connect a SQLite file to an Android project
Forum Updated to NodeBB v4.3 + New Features

How to connect a SQLite file to an Android project

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 2 Posters 528 Views 1 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.
  • M Offline
    M Offline
    Mikeeeeee
    wrote on last edited by
    #1

    Hi!
    How to connect a SQLite file to an Android project?
    SQLite database cannot be placed in resources(say it is impossible).

    jsulmJ 1 Reply Last reply
    0
    • M Mikeeeeee

      Hi!
      How to connect a SQLite file to an Android project?
      SQLite database cannot be placed in resources(say it is impossible).

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

      @Mikeeeeee said in How to connect a SQLite file to an Android project:

      SQLite database cannot be placed in resources(say it is impossible).

      It is possible, but to use it after installing the app you will have to copy it to a writeable location first.
      Use https://doc.qt.io/qt-5/qstandardpaths.html#writableLocation to find a writeable location.

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

      1 Reply Last reply
      2
      • M Offline
        M Offline
        Mikeeeeee
        wrote on last edited by
        #3

        But how to add a SQLite file to a project so that it is added to .apk?

        jsulmJ 1 Reply Last reply
        0
        • M Mikeeeeee

          But how to add a SQLite file to a project so that it is added to .apk?

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

          @Mikeeeeee You already answered your question: using a resource file

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

          1 Reply Last reply
          2
          • M Offline
            M Offline
            Mikeeeeee
            wrote on last edited by
            #5

            Thanks. Before why it is not compiled, and is now working.

            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