0

I have have created and populated a Room database. What I would like to do is to export the database and include it in an Android library module, along with the supporting DTO's, so that it can be consumed by an app.

Is this possible and if so, how can it be achieved?

Rhisiart
  • 1,046
  • 12
  • 13
  • 1
    [This sample app](https://github.com/commonsguy/cw-androidarch/tree/v0.4/General/AssetRoom) demonstrates how to package a Room database in an app. – CommonsWare Oct 17 '17 at 12:27
  • Beautiful! Thanks Mark. – Rhisiart Oct 17 '17 at 12:43
  • One question - how did you create the `constants.db` in the first place? – Rhisiart Oct 17 '17 at 21:31
  • 1
    Through the `sqlite3` command line tool on my Linux machine, years ago for my original `SQLiteAssetHelper` book sample. – CommonsWare Oct 17 '17 at 22:01
  • If anyone is interested, the [sample app](https://github.com/commonsguy/cw-androidarch/tree/v0.4/General/AssetRoom) mentioned above can now be consumed [here](https://bitbucket.org/xni06/asset-room) - thanks Mark. – Rhisiart Nov 17 '17 at 21:32

0 Answers0