PrebuildContract

Home   »   PrebuildContract

 // Register pre-build Contract
    private val pickImages =
        registerForActivityResult(ActivityResultContracts.GetContent()) { uri ->
            uri?.let { uri ->
                bi.imgCameraPic.setImageURI(uri)
                bi.imgCameraPic.visibility = View.VISIBLE
            }
        }
    // Call contract
    pickImages.launch("image/*")

Leave a Reply

Your email address will not be published. Required fields are marked *