[android-developers] Re: Database not created after insert, causing test to fail

2011-12-31 Thread barry
Hi James, I think I have fixed the problem. The following may answer your question: In the onCreate() in my ContentProvider, I was leaving the database open: @Override public boolean onCreate() { UKMPGDataProvider.init(getContext(), Constants.DATABASE_NAME); return

[android-developers] Re: Database not created after insert, causing test to fail

2011-12-30 Thread barry
My apologies for the formatting in the original message! On Dec 30, 11:54 pm, barry barry.drinkwa...@gmail.com wrote: I have an app which uses a sqlite database and a ContentProvider to serve up data. The eclipse project has a unit test which adds a record to a database, retrieves it and