android appwidgetprovider sqlite database not creating record

view full story

http://stackoverflow.com – I have an appwidgetprovider which updates my sqlite database when the icons are "clicked" by the user. This is triggered by the onRecieve method and has worked fine but it now appears it will only work when records have been created by the activity first. The database is handled by its own DBadapter class and both the activity and the appwidgetprovider use this class in the same way: mydb = new DBadapter(this); mydb = mydb.open(); As the DBadapter creates the database in the onCreate method I cannot understand why the activity a) creates the database and b) can create the first record bu (HowTos)