Set up
Assist API 21 and above
Step 1. Add it in your root construct.gradle on the finish of repositories:
Step 2. Add the dependency
Fundamental implementation
Generate name consequence from an exercise
returns an inventory with paths of captured or chosen pictures (Record)
non-public enjoyable initCall() {
resultScan = registerForActivityResult(androidx.exercise.consequence.contract.
ActivityResultContracts.StartActivityForResult()) { consequence ->
if (consequence.resultCode == Exercise.RESULT_OK) {
val listing = consequence.information?.getStringArrayListExtra(EasyCamera.IMAGE_RESULTS)
print(listing)
}
}
}
Launch the digicam ship as parameter the context, choices and consequence
Customized implementation
depend = 1,
path = “CustomFolder“,
flash = Flash.Auto,
isFrontFacing = true,
ratio = Ratio.RATIO_16_9
)
EasyCamera.begin(this, optionsCamera, resultScan)
Attributes Sort Notice depend Int Variety of captured pictures. path String Folder the place the photographs are saved. footage/customFolder flash Flash Management the flash of your implementation. isFrontFacing Boolean Activate the entrance digicam by default. ratio Ration Management the scale of your captured picture.
Due to
License
Licensed beneath MIT, click on right here for the total license.
Creator & help
This mission was created by AHRSOFT.
When you respect my work, think about shopping for me a cup of ☕ to maintain me recharged ???? by PayPal