My intention is to get the pictures from gallery and pass it through intent. I've already done the first part. And maybe this question has been already asked once here, but I'm very new and still not sure how the process of passing images through intent works. I've tried half way and got stuck. Below is my code.
fun ShowImage(){
val intent = Intent(this, AnotherActivity::class.java)
startActivity(intent)
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if(resultCode == Activity.RESULT_OK && requestCode ==
IMAGE_PICK_CODE && data != null){
image_view.setImageURI(data.data)
}
}