mhotan / DineOn

Git Repository for our 403(13sp) Android application "DineOn"
0 stars 0 forks source link

Occassional Crash on image upload #316

Closed mhotan closed 11 years ago

mhotan commented 11 years ago

It crashed once when I attempted to upload an image. This happened because opening and closing the data base happens in on Pause and onResume. When taking a picture the current Activity is pause and resume is suppose to be called. Something happened where it got out of sync. Potential solution is put the calls to open and close in onCreate and onDestroy

mhotan commented 11 years ago

Its a asyncronous problem where the database is closed while an async task to add the image is running. I just check if the database is closed and dont add it if it is. This allows for a single cache miss for the image added after close