views:

31

answers:

1

I have a series of activities that share a database. In the primary activity the user will be doing things will the program automatically logs data into the db. This continues until the user would like to view the database by starting the view database activity. How I have it set up is that onPause will close the database so the the DBViewer onStart() will reopen it. Inefficient but I can't think of a better way to do it. Any who, on pause is never being called. All the threads of the Activity A are still running as Activity B begins onStart(). Any clues or help would be appreciated.

~Aedon

+1  A: 

Take a look at the sample NotePad app included in the SDK or the NotePad tutorial for the specific code you need. You should also use Activity.startManagingCursor(Cursor c) so you don't have to manage the cursor's lifecycle.

elevine