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 outcome from an exercise
returns an inventory with paths of captured or chosen pictures (Checklist)
personal enjoyable initCall() {
resultScan = registerForActivityResult(androidx.exercise.outcome.contract.
ActivityResultContracts.StartActivityForResult()) { outcome ->
if (outcome.resultCode == Exercise.RESULT_OK) {
val record = outcome.knowledge?.getStringArrayListExtra(EasyCamera.IMAGE_RESULTS)
print(record)
}
}
}
Launch the digital camera ship as parameter the context, choices and outcome
Customized implementation
rely = 1,
path = “CustomFolder“,
flash = Flash.Auto,
isFrontFacing = true,
ratio = Ratio.RATIO_16_9
)
EasyCamera.begin(this, optionsCamera, resultScan)
Attributes Kind Observe rely Int Variety of captured pictures. path String Folder the place the photographs are saved. photos/customFolder flash Flash Management the flash of your implementation. isFrontFacing Boolean Activate the entrance digital camera by default. ratio Ration Management the size of your captured picture.
Due to
License
Licensed beneath MIT, click on right here for the total license.
Writer & assist
This undertaking was created by AHRSOFT.
If you happen to respect my work, contemplate shopping for me a cup of ☕ to maintain me recharged ???? by PayPal