3

I have found similar questions but they are all purely for SQLite, if those answers apply to this question please advise instead of just marking it as duplicate. How is a ROOM db and SQLite db seen as "Exactly the same"?

I have an application making use of the Room database on Android. I basically need to have a second application (mostly or diagnostics) accessing the same database so that I can add and view data.

Would this be possible and if so please point me in the right direction?

Solx85
  • 244
  • 2
  • 16
  • 1
    How is this marked as a duplicate? Although Room uses SQLite it is not the same thing! If the SQLite question you said I am duplicating was the same I would not have asked this in the first place – Solx85 Mar 28 '18 at 12:32
  • 2
    The best practice of sharing database across apps is ContentProvider. According to https://github.com/googlesamples/android-architecture-components/issues/13 this is not possible - Room isn't designed for cross-process calling. There may be some hard way to implement a virtual database by implementing all methods in SupportSQLiteDatabase and delegating them to ContentProvider, but not worth trying since it'd be a huge work to do. – mariotaku Mar 30 '18 at 10:44

0 Answers0