Android Question SQLite - create and ship?

Discussion in 'Android Questions' started by Tony Tetley, Mar 27, 2015.

  1. Tony Tetley

    Tony Tetley Member Licensed User

    Hello, is it possible to create an SQLite DB with something like http://www.sqliteexpert.com/ and then include it with the app install package? Do you place it in the Files list which includes it in the .DirAssets or some other method?

    Thanks,
    Tony
     
  2. NJDude

    NJDude Expert Licensed User

    Yes, any files needed to be distributed with the app have to be added to the assets directory.
     
    thedesolatesoul likes this.
  3. Tony Tetley

    Tony Tetley Member Licensed User

    Thank you! Do you know anything about SQLite Expert?
     
  4. NJDude

    NJDude Expert Licensed User

    Know as in what? SQLite Expert or any other SQLite editor are basically the same, just choose the one you like.
     
  5. Tony Tetley

    Tony Tetley Member Licensed User

    Ok, thanks!
     
  6. keirS

    keirS Well-Known Member Licensed User

    It's not good practice to do this. SQLite expert uses version 3.8.x of the SQLite library. Android uses SQLite versions from 3.5.x to 3.8.x depending on the version of Android. Only Lollipop uses 3.8.x. SQLite only supports backwards compatibility so SQLite 3.6.x might not be able to read a 3.8.x database.
     
  7. parijs

    parijs Active Member Licensed User

    Never had a problem with SQLite expert even with the very first tab7
     
  8. keirS

    keirS Well-Known Member Licensed User

    From the SQLite documentation

    Try a SQLite DB that uses foreign key constraints on a device running Eclair. I can guarantee it will f**k up.
     
  9. NJDude

    NJDude Expert Licensed User

    I just wonder who's still running Eclair.
     
  10. keirS

    keirS Well-Known Member Licensed User

    Companies using 5 year old ruggedized handheld terminals. You can still buy new ones running Gingerbread.
     
  11. Erel

    Erel Administrator Staff Member Licensed User

    Note that you can DBUtils.CopyDBFromAssets to copy the database file.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice