If no image is selected, save it to DB!

Asked 2 years ago, Updated 2 years ago, 42 views

I'm a novice developer.crying I save the image URI I chose from the gallery in DB! If you do not select an image...When I tried to save it, the app turned off!

String str_image = mImageCaptureUri.toString();

I saved the URI like this, but if the image is not selected, how do I give the conditional statement if I want to put the default image (R.drawable.image)?

android image database listview

2022-09-21 15:43

1 Answers

if(String str_image==null){ String str_image = R.drawable.image; saveMethodName(String str_image); }

Do this Bbyong


2022-09-21 15:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.