Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 2 Support (Qt 5) › Getting location of database on iOS and Android via engine.offlineStoragePath()

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #19802

    Eric

    I’m trying to get the location of the database created from LocalStorage.openDatabaseSync(). I can use qDebug() to show the path when running the app outside Felgo Live but I want to get it to display the path from Felgo Live so I can see it on an Android device and iOS device. I’ve tried a couple methods I’ve found online to create Objects that can be called from QML or set the property of a normal QML object, however, I can’t get these to work in Felgo Live, it seems the the methods Felgo uses to load the app aren’t compatible with what I’ve been trying to do.

    I also tried finding it through FileUtils but was unsuccessful.

    So, my question is this: How can I get the location of the database on iOS, Android, PC, and Mac?

    Thank you,
    Eric

    #19805

    Günther
    Felgo Team

    Hi,

    according to the Qt Quick Local Storage documentation, the database file are stored at the QQmlEngine::offlineStoragePath() location.
    This is the same for both Felgo apps and Qt apps, as well as Felgo Live.

    In case you intend to add custom C++ code to Felgo Live: Such code requires to be compiled and bundled with the application. You can build your own Live Client with custom C++ additions as described here: https://felgo.com/updates/release-2-16-1-live-code-reloading-with-custom-c-and-native-code-for-qt

     

    Best,
    Günther

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded