How to take image through pro camera extension
Use the Initialize block and then the TakePicture block.
Wait till I make an AIA file for you.
when i clicked on take picture the app suddenly crashed
- Have you set a writable Output file location ?
- Have you given camera permission?
You need to give the camera permission before the initialize method.
Wait till I make the AIA.
I'm testing things now.
i need to set picture on image component
i have given the camera permission
from this i can not take images more than 1 time.
It shows error - "Attempt to invoke virtual method 'boolean android.graphics.Bitmap.compress(android.graphics.Bitmap$CompressFormat, int, java.io.OutputStream)' on a null object reference"
now also it is showing that only
Here you go :
ProCamera.aia (99.0 KB)
Fully Tested.
Only the Flash switch is not working.
Test this until I fix that.
can you tell how to set the image on an image component
Try this
QuickProCamToImage.aia (35.0 KB)
Tested compiled and working on Android 12. Will ask for Camera permission on first run.
Drag in an image component outside of VirtualScreen1 and set it's visible property to false, width to 100% or 98% or 96% or as you wish, height to automatic.
In the ProCamera1.SavedPhoto event, add the following blocks at the end :
- Set VirtualScreen1.Visible false
- Set Image1.Picture ProCamera1.Output
- Set Image1.Visible true
Now add a button to return to the Camera.
The Button1.OnClick event blocks should be :
- Set Image1.Visible false
- Set CameraContainer.Visible true
And you are done.
Also, pls use the following step : Don't forget to mark the Solution after getting it.
And at last, Enjoy...
not requested
Added that feature for safety purposes though...
Also asked if it is requested.
Thank you so much TIMAI2 and Shubhamr69 for your help😊 . Now all thing is working fine😁.