Pro camera made designed to work with lastest Android camera API wich gives
which gives accessibility to more features.
Extension needs Android 5.0 Lollipop and above in-order for the extension to work.
Extension features
- Latest API used
- Camera Filters
- Noise reduction mode
- Enhance mode for preview and output
- Lock and Unlock camera focus
- Manual focus over distance (Currently supported in some devices having the feature)
- Other minor things that a normal camera have
Documentation
Explaining how each block work and their features
Fired when camera focus is locked successfully.
Fired when the user zooms by pinch
ZoomByPinch
zoomTypeIncrease: Whether the zoom has been increased
Fired when camera preview is touched
Fired when camera focus is unlocked successfully
If the events
FocusLocked
or FocusUnlocked
is not fired then the phone dosent supports locking camera focus in API.
Fired when camera layout or the camera preview is initialized
Fired when camera and camera's settings are refreshed is live state
Fired when the photo is saved successfully into the internal storage
Fired when zoom of camera is changed
Initialize the camera view to the component (arrangement) given.
Initialize
component: Arrangement to initialize the camera
cameraType: Camera type, front-camera or rear-camera
Focus on the given distance unit measured in diopters. Just google it.
This feature may not work on some devices, no way to check if supported and may throw error. Learn more: StackOverFlow
Focus
distance: Distance needs to be focused in diopeters
Check if the extension is supported on the device
Return Type: True / False | boolean
Locks the camera focus the currently focusing object
Fires event: when FocusLocked
Unlocks the camera focus from the object
Fires event: when FocusUnlocked
Refreshes the camera along with all settings applied
Fires event: when RefreshedCamera
Destroys the camera layout and resets the camera
Takes the picture and saves in the path given
Fires event: when SavedPhoto
Saves the preview picture
Stable and recommended way to save pictures.
Fires event: when SavedPhoto
Adds the given arrangement inside the camera view
Sets the zoom of the camera preview
Fires event: when ZoomChanged
Check if the camera view is active (visible)
Return Type: True / False | boolean
Work: Sets the camera filter, input values in numbers
Returns: Current camera filter in numbers
Returns: Default camera filter value 0
Returns: Mono camera filter value 1
Returns: Negative camera filter value 2
Returns: Solarize camera filter value 3
Returns: Sepia camera filter value 4
Returns: Posterize camera filter value 5
Returns: Whiteboard camera filter value 6
Returns: Blackboard camera filter value 7
Returns: Aqua camera filter value 8
Work: Sets the camera ehnhance mode, input values in True / False | boolean
Returns: Current value of enhance mode
Work: Sets the camera flash mode, input values in True / False | boolean
Returns: Current value of flash mode
Work: Sets the camera visible / invisible, input values in True / False | boolean
Returns: Current value of is visible
Work: Sets the camera output image, input values in Text
Returns: Current value of output image
Work: Sets the camera noise reduction mode, input values in numbers
Returns: Current value of noise reduction mode
Returns: Default noise reduction mode value 0
Returns: Fast noise reduction mode value 1
Returns: Hign quality noise reduction mode value 2
Returns: Minimal noise reduction mode value 3
Returns: No shutter lag noise reduction mode value 4
Returns: Camera type front value 0
Returns: Camera type rear value 1
Returns: Camera's max zoom
Work: Enables or disables the feature to pinch to zoom, input values in True / False | boolean
Returns: Current value of pinch to zoom
Returns: Current value of camera zoom
Work: Sets the focus mode type, input value in numbers
Returns: FaceFocusMode simple value 0
Returns: FaceFocusMode high value 2
Pro camera: 2.0 changed
Fired when the user zooms by pinch
ZoomByPinch
zoomTypeIncrease: Whether the zoom has been increased
Fired when camera preview is touched
Work: Enables or disables the feature to pinch to zoom, input values in True / False | boolean
Returns: Current value of pinch to zoom
Adds the given arrangement inside the camera view
Check if the camera view is active (visible)
Work: Sets the focus mode type, input value in numbers
Returns: FaceFocusMode simple value 0
Returns: FaceFocusMode high value 2
Returns: Current value of camera zoom
Internal changes
- Fixed minor issues & done modifications
- Fixed issue where extension failed to take the photo.
Thanks to all the beta testers
Output result screenshots
Note that the camera layout size of more than 70% may look stretched.
Download
- Direct download: com.kumaraswamy.camerax.aix (47.0 KB)
- Drive download: https://drive.google.com/file/d/1gPjsjJkVd3B9rVpPZ0dfid5sBy_fh6QP/view?usp=sharing
Open source
Any suggestions or improvements are appreciated! Lemme know if you face any issue!