Pro camera: The pro custom camera

Pro camera made designed to work with lastest Android camera API wich gives
which gives accessibility to more features.


:information_source: 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.


SharedScreenshot

Fired when the user zooms by pinch

ZoomByPinch

zoomTypeIncrease: Whether the zoom has been increased


SharedScreenshot4
Fired when camera preview is touched


Fired when camera focus is unlocked successfully


:information_source: 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

Focus on the given distance unit measured in diopters. Just google it.

:warning: 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

:white_check_mark: Stable and recommended way to save pictures.

Fires event: when SavedPhoto


SharedScreenshot3
Adds the given arrangement inside the camera view


dozoom

Sets the zoom of the camera preview

Fires event: when ZoomChanged


SharedScreenshot3

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


flashM

Returns: Current value of flash mode


Work: Sets the camera visible / invisible, input values in True / False | boolean


visibleM

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

SharedScreenshot3

Returns: Current value of pinch to zoom


zoom

Returns: Current value of camera zoom


Work: Sets the focus mode type, input value in numbers


SharedScreenshot

Returns: FaceFocusMode simple value 0


SharedScreenshot

Returns: FaceFocusMode high value 2


Pro camera: 2.0 changed

SharedScreenshot

Fired when the user zooms by pinch

ZoomByPinch

zoomTypeIncrease: Whether the zoom has been increased


SharedScreenshot4
Fired when camera preview is touched

Work: Enables or disables the feature to pinch to zoom, input values in True / False | boolean

SharedScreenshot3

Returns: Current value of pinch to zoom


SharedScreenshot3
Adds the given arrangement inside the camera view


SharedScreenshot3

Check if the camera view is active (visible)


Work: Sets the focus mode type, input value in numbers


SharedScreenshot

Returns: FaceFocusMode simple value 0


SharedScreenshot

Returns: FaceFocusMode high value 2


zoom

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 :heartpulse:

Output result screenshots


Note that the camera layout size of more than 70% may look stretched.

Download


Open source


Any suggestions or improvements are appreciated! Lemme know if you face any issue!

29 Likes

Fabulous, nice, awesome......Extension @Kumaraswamy :smiley:

3 Likes

nice @Kumaraswamy you did a great job

3 Likes

Wow, Nice Extension @Kumaraswamy

4 Likes

Indian Amount :star_struck:

And Nice Extension

4 Likes

APK File??

Hello, currently I don't provide APK file for security reasons, I can give you if you're more interested in buying.

4 Likes

Ok thanks for replying :blush:

2 Likes

Holy cow Batman - the extension of 2021 so far. :sunglasses:

10 Likes

Pro camera: Version 2.0 :watermelon:


SharedScreenshot

Fired when the user zooms by pinch

ZoomByPinch

zoomTypeIncrease: Whether the zoom has been increased


SharedScreenshot4
Fired when camera preview is touched

Work: Enables or disables the feature to pinch to zoom, input values in True / False | boolean

SharedScreenshot3

Returns: Current value of pinch to zoom


SharedScreenshot3
Adds the given arrangement inside the camera view


SharedScreenshot3

Check if the camera view is active (visible)


Work: Sets the focus mode type, input value in numbers


SharedScreenshot

Returns: FaceFocusMode simple value 0


SharedScreenshot

Returns: FaceFocusMode high value 2


zoom

Returns: Current value of camera zoom


Internal changes


  • Fixed minor issues & done modifications.
  • Fixed issue where extension failed to take the photo.
6 Likes

could you add functions like ISO adjustment , set time of exposure,like 1/8S,1/2s...... 2s ...

3 Likes

The extension is now free! Enjoy!

12 Likes

i try to build to apk but after installation on phone i open it and the app crash when it initialize camera

Hello, could you please show me you're blocks and android version?

hello thank you for reply


here is my phone detail. it use android 9


i try this block via usb from ai starter it works perfectly. i can take photo using both front and rear camera.
but when i build it to apk
when i press button check support, it says my phone is support. but when i press button initialize camera it crash
i try to open the app again but it crash again
it crash if i click button initialize camera

1 Like

Hello, could you please try enabling the storage permission for the app? Is permission allowed?

3 Likes

thankyou so much kumaraswamy :blush:
now it work flawlesly
turns out i forgot to allowed camera permission
you are my savior, you are so genious :metal:

2 Likes

I'm happy to listen to this!

3 Likes

@ ᴋᴜᴍᴀʀᴀsᴡᴀᴍʏ_ʙ.ɢ

Enhancement suggestion - allow the App to write text on the photo (typically a date-time stamp).

6 Likes

I am having a discussion with the developer of the Pro Camera extension on a different form. The form moderator suggested I bring the conversation to this form. Here's a summary…

--- Me ---
Thanks for a great extension.
I would like to do a CCTV type app that sends low-quality video from one phone to another via my local LAN. I did an app like this years ago, but it uses the original camera library which is no longer supported on my Android 11 devices.
Is there a way to get a bitmap or JPEG preview image from the frame (vertical layout) into a byte array variable that can be sent over the network to another device?
--- Pro camera extension developer ---
Yes, this is possible to be done. You can use any extension (other) which will return the byte values in a list that you can send over networks. But it may lag a bit because the list size will be too high.
--- Me ---
I’m not super knowledgeable in using App Inventor. Do you know what code (blocks) would be used in order to read the byte data from the frame (vertical arrangement)?
I agree it would lag terribly if I used the full-sized preview image from the camera. What I did previously was I was able to reduce the preview image size to, for example, 640x480. This was using the original camera library. From what I can tell the camera2 library will use the frame size to reduce the size of the preview image – so if I set the vertical arrangement frame size to 640x480 hopefully it will reduce the preview image size (this is all just a guess).>

  1. In App Inventor how would I get the preview image data from the vertical arrangement?
  2. Will changing the dimensions of the vertical frame change the size of the preview image?

Any help is greatly appreciated.

Thanks,
Barry.