Just back from holiday, so I just now was able to try Erel's suggestion. It does not solve my problem. I would like the program to resume where it left off (i.e., viewing a particular table from a given database). The suggested code restarts the program which I could do without the suggested code (by pressing "yes" when asked to continue).
Because the activity is restarted, saving the DirName, FileName, and TableName in global variables won't work. I could write that information (map or text file) and read it in when the Main activity starts. Then I would always get the last database/table that I was working with. Do you think that would work, or do you have a better idea?