Persistent Storage with sqlite database

2 posts, 0 answers
  1. Kay
    Kay avatar
    1 posts
    Member since:
    Nov 2013

    Posted 26 Jan 2014 Link to this post

    I have 2 questions regarding sqlite when running on the AppBuilder companion app:

    1. Access to db file
    I tested your sample project "Sqlite" (formerly sample-sqlite) in the AppBuilder companion app on ios7.
    After relaunching the app previously entered items are displayed but the todo list seems no longer accessible.
    Data Items cannot be deleted. New items cannot be added.
    - Do you have an update of your sample code where this effect does not occur?

    2. Path to db file
    I did not find documentation about the path where the database file is saved - did not find it in the /Documents folder (fileSystem.root.fullPath).
    - Where is it saved? (would be helpful for updating the file from a server)
    - Is it a persistent memory area?

    Thanks & Regards



  2. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 29 Jan 2014 Link to this post

    Hi Kay,

    Thank you for bringing these questions.

    1. I just tested the SQLite sample app deployed via the AppBuilder Companion App and it worked as expected. I was able to add items to the list and to delete them. Even after relaunching the application, the items were there and I was able to use the add/delete functions. However, I would strongly recommend deploying the applications on a connected devices in order to test Integrated Cordova plugins. You will find how to do this, here.
    2. The SQLite plugin provides a persistent local data storage. The db locations should be as follows:
      For Android - /data/data/{app.package}/databases/ or /data/data/{app.package}/app_database/
      For iOS - Document Folder/Your App Docs/

    Further, you can check what's behind the integrated plugin here, or check its forum following this link.

    I hope this answers your questions.

    Regards,
    Kaloyan
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top