posted 8 years ago
I wonder how to avoid the app from crashing if no image is inserted into SQLite ?
In Activity B, there has one save button, one open camera button and imageView.
save button used to return the image to A, open camera button used for user to select picture and imageView placed the selected image.
In Activity A , it has a submit button, used to save the image which was returned from B to SQLite.
Activity B
Activity A
LogCat Error
The logCat shows that I didn't insert any image to SQLite. How can I write an if-else condition so that the app will not crashed when no image is inserted ?
StaffAP
Thanks
Learning language is easy but learning basics is difficult