So this is the image file I got. Now, how do I convert this picturePath into a byte array so I can store it in my database?
Uri selectedImage = data.getData();
String[] filePathColumn = {MediaStore.Images.Media.DATA};
Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
picturePath = cursor.getString(columnIndex);
cursor.close();
ivFoodPicture.setImageBitmap(BitmapFactory.decodeFile(picturePath));