Apr 14, 2019 Replies: 16 This is a wrap for this Github project. CameraKit helps you add reliable camera to your app quickly. Our open source camera platform provides consistent capture results, service that scales, and endless camera possibilities. With CameraKit you are able to effortlessly do the following: Image and video capture seamlessly working with the same preview session. Automatic system permission handling. Automatic preview scaling. Create a CameraView of any size (not just presets!). Automatic output cropping to match your CameraView bounds. Multiple capture methods. METHOD_STANDARD: an image captured normally using the camera APIs. METHOD_STILL: a freeze frame of the CameraView preview (similar to SnapChat and Instagram) for devices with slower cameras. METHOD_SPEED: automatic capture method determination based on measured speed. Built-in continuous focus. Built-in tap to focus. Built-in pinch to zoom. Even while recoding a Video. CameraKit <link>...|https://www.b4x.com</link> Author: DonManfred Version: 0.52 CameraKit Events: onError (error As String) onEvent (event As String) onImage (image() As Byte) onTextDetect (detectedText As String) onVideo (video As String) Functions: addController (controller As com.wonderkiln.camerakit.CameraKitController) bindCameraKitListener (object As Object) BringToFront captureImage captureImage2 captureVideo (path As String, filename As String) Starts capturing a Video. The Video is saved to the given path using the given filename The duration is set to endless. You need to stop the capture using stopVideo(). captureVideo2 (path As String, filename As String, maxDuration As Int) Starts capturing a Video. The Video is saved to the given path using the given filename The maximum duration is set to maxDuration seconds. DesignerCreateView (base As Panel, lw As Label, props As Map) Initialize (EventName As String) Invalidate Invalidate2 (arg0 As android.graphics.Rect) Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) isFacingBack As Boolean isFacingFront As Boolean IsInitialized As Boolean isStarted As Boolean RemoveView RequestFocus As Boolean SendToBack SetBackgroundImage (arg0 As android.graphics.Bitmap) As BitmapDrawable SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int) SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int) SetVisibleAnimated (arg0 As Int, arg1 As Boolean) start stop stopVideo toggleFacing As Int toggleFlash As Int Properties: Background As android.graphics.drawable.Drawable CameraProperties As com.wonderkiln.camerakit.CameraProperties [read only] CaptureSize As com.wonderkiln.camerakit.Size [read only] Color As Int [write only] CropOutput As Boolean [write only] Enabled As Boolean Facing As Int Flash As Int 0 = FLASH_OFF, 1 = FLASH_ON, 2 = FLASH_AUTO, 3 = FLASH_TORCH Focus As Int [write only] 0 = FOCUS_CONTINUOUS, 1 = FOCUS_TAP, 2 = FOCUS_OFF, 3 = FOCUS_TAP_WITH_MARKER Height As Int JpegQuality As Int [write only] Left As Int LockVideoAspectRatio As Boolean [write only] Method As Int [write only] 0 = METHOD_STANDARD, 1 = METHOD_STILL Padding As Int() Parent As Object [read only] PinchToZoom As Boolean [write only] PreviewSize As com.wonderkiln.camerakit.Size [read only] Tag As Object Top As Int VideoBitRate As Int [write only] VideoQuality As Int [write only] 0 = VIDEO_QUALITY_QVGA, 1 = VIDEO_QUALITY_480P, 2 = VIDEO_QUALITY_720P, 3 = VIDEO_QUALITY_1080P, 4 = VIDEO_QUALITY_2160P,5 = VIDEO_QUALITY_HIGHEST, 6 = VIDEO_QUALITY_LOWEST Visible As Boolean Width As Int Zoom As Float [write only] Known issues: It depends on Google Playservice Vision but the Textrecognition seems to freeze the app. So for now i´ve removed the ability to activate it but the reference must still be there. Setup: Download CameraKit1.zip and rename it to CameraKit.zip.001 CameraKit2.zip and rename it to CameraKit.zip.002 Extract it with 7Zip. Attachments CameraKit1.zip CameraKit1.zip 500 KB · Views: 1,334 CameraKit2.zip CameraKit2.zip 422.2 KB · Views: 1,365 CameraExample.zip CameraExample.zip 10.8 KB · Views: 1,297 Click to expand...
This is a wrap for this Github project. CameraKit helps you add reliable camera to your app quickly. Our open source camera platform provides consistent capture results, service that scales, and endless camera possibilities. With CameraKit you are able to effortlessly do the following: Image and video capture seamlessly working with the same preview session. Automatic system permission handling. Automatic preview scaling. Create a CameraView of any size (not just presets!). Automatic output cropping to match your CameraView bounds. Multiple capture methods. METHOD_STANDARD: an image captured normally using the camera APIs. METHOD_STILL: a freeze frame of the CameraView preview (similar to SnapChat and Instagram) for devices with slower cameras. METHOD_SPEED: automatic capture method determination based on measured speed. Built-in continuous focus. Built-in tap to focus. Built-in pinch to zoom. Even while recoding a Video. CameraKit <link>...|https://www.b4x.com</link> Author: DonManfred Version: 0.52 CameraKit Events: onError (error As String) onEvent (event As String) onImage (image() As Byte) onTextDetect (detectedText As String) onVideo (video As String) Functions: addController (controller As com.wonderkiln.camerakit.CameraKitController) bindCameraKitListener (object As Object) BringToFront captureImage captureImage2 captureVideo (path As String, filename As String) Starts capturing a Video. The Video is saved to the given path using the given filename The duration is set to endless. You need to stop the capture using stopVideo(). captureVideo2 (path As String, filename As String, maxDuration As Int) Starts capturing a Video. The Video is saved to the given path using the given filename The maximum duration is set to maxDuration seconds. DesignerCreateView (base As Panel, lw As Label, props As Map) Initialize (EventName As String) Invalidate Invalidate2 (arg0 As android.graphics.Rect) Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) isFacingBack As Boolean isFacingFront As Boolean IsInitialized As Boolean isStarted As Boolean RemoveView RequestFocus As Boolean SendToBack SetBackgroundImage (arg0 As android.graphics.Bitmap) As BitmapDrawable SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int) SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int) SetVisibleAnimated (arg0 As Int, arg1 As Boolean) start stop stopVideo toggleFacing As Int toggleFlash As Int Properties: Background As android.graphics.drawable.Drawable CameraProperties As com.wonderkiln.camerakit.CameraProperties [read only] CaptureSize As com.wonderkiln.camerakit.Size [read only] Color As Int [write only] CropOutput As Boolean [write only] Enabled As Boolean Facing As Int Flash As Int 0 = FLASH_OFF, 1 = FLASH_ON, 2 = FLASH_AUTO, 3 = FLASH_TORCH Focus As Int [write only] 0 = FOCUS_CONTINUOUS, 1 = FOCUS_TAP, 2 = FOCUS_OFF, 3 = FOCUS_TAP_WITH_MARKER Height As Int JpegQuality As Int [write only] Left As Int LockVideoAspectRatio As Boolean [write only] Method As Int [write only] 0 = METHOD_STANDARD, 1 = METHOD_STILL Padding As Int() Parent As Object [read only] PinchToZoom As Boolean [write only] PreviewSize As com.wonderkiln.camerakit.Size [read only] Tag As Object Top As Int VideoBitRate As Int [write only] VideoQuality As Int [write only] 0 = VIDEO_QUALITY_QVGA, 1 = VIDEO_QUALITY_480P, 2 = VIDEO_QUALITY_720P, 3 = VIDEO_QUALITY_1080P, 4 = VIDEO_QUALITY_2160P,5 = VIDEO_QUALITY_HIGHEST, 6 = VIDEO_QUALITY_LOWEST Visible As Boolean Width As Int Zoom As Float [write only] Known issues: It depends on Google Playservice Vision but the Textrecognition seems to freeze the app. So for now i´ve removed the ability to activate it but the reference must still be there. Setup: Download CameraKit1.zip and rename it to CameraKit.zip.001 CameraKit2.zip and rename it to CameraKit.zip.002 Extract it with 7Zip.
Peter Simpson Expert Licensed User Longtime User Apr 14, 2019 #3 I'm going to have a play with this library later on today, cheers Don
johndb Active Member Licensed User Longtime User Apr 14, 2019 #4 Thank you very much for this library @DonManfred. I'd like to test it but am having difficulty unzipping your split zip using 7zip. Any chance of you uploading a standard zip (one archive) with all the library files? Thanks.
Thank you very much for this library @DonManfred. I'd like to test it but am having difficulty unzipping your split zip using 7zip. Any chance of you uploading a standard zip (one archive) with all the library files? Thanks.
DonManfred Expert Licensed User Longtime User Apr 14, 2019 #5 https://www.dropbox.com/sh/hxjawhcxqfek1wh/AACyVZ-cJW01rH0vREIymdr7a?dl=0
J JanG Member Licensed User Longtime User Aug 22, 2019 #6 Thanks! Compiling: OK Installation: OK Running: Crash while starting. No GUI. Nothing. Just crash... Device: Samsung A40, Android 9 Any ideas?
Thanks! Compiling: OK Installation: OK Running: Crash while starting. No GUI. Nothing. Just crash... Device: Samsung A40, Android 9 Any ideas?
DonManfred Expert Licensed User Longtime User Aug 22, 2019 #7 JanG said: Any ideas? Click to expand... - You should always create a new thread in the questionsforum for any issue you have. - You need to provide more informations in that thread. Post the full error. There is no such thing in android like Crash while starting. No GUI. Nothing. There is always a error in the Log. Maybe you need to check the unfiltered log but the error must be there.
JanG said: Any ideas? Click to expand... - You should always create a new thread in the questionsforum for any issue you have. - You need to provide more informations in that thread. Post the full error. There is no such thing in android like Crash while starting. No GUI. Nothing. There is always a error in the Log. Maybe you need to check the unfiltered log but the error must be there.
DonManfred Expert Licensed User Longtime User Feb 20, 2020 #9 1. You should always create a NEW thread in the Questionsforum for any Issue/Question you have. Posting to existing threads is a mistake. 2. Widgets are limited in B4A. CameraKit can not be used in a Widget. It needs an Activitycontext as it accesses the device Camera.
1. You should always create a NEW thread in the Questionsforum for any Issue/Question you have. Posting to existing threads is a mistake. 2. Widgets are limited in B4A. CameraKit can not be used in a Widget. It needs an Activitycontext as it accesses the device Camera.
Javier Garrido Member Licensed User May 1, 2020 #10 Is it possible to add a label or an imageview to the camerakit panel so that it appears in the photograph or in the video? thanks
Is it possible to add a label or an imageview to the camerakit panel so that it appears in the photograph or in the video? thanks
DonManfred Expert Licensed User Longtime User May 2, 2020 #11 DonManfred said: You should always create a NEW thread in the Questionsforum for any Issue/Question you have. Posting to existing threads is a mistake. Click to expand... The answer is no btw. You need to add it to the resulting image by yourself. Last edited: May 2, 2020
DonManfred said: You should always create a NEW thread in the Questionsforum for any Issue/Question you have. Posting to existing threads is a mistake. Click to expand... The answer is no btw. You need to add it to the resulting image by yourself.
Nkalampika Active Member Licensed User May 2, 2020 #12 hello i get an error Landroid/support/v4/util/SparseArrayCompat;
Erel B4X founder Staff member Licensed User Longtime User May 3, 2020 #13 You need to jetify the library.
Nkalampika Active Member Licensed User May 3, 2020 #14 I had already done it. i have all jetify but .. still have the same problem
Nkalampika Active Member Licensed User May 3, 2020 #15 Please help me .. if there is also another camera with the functions i want ... i will use it
Erel B4X founder Staff member Licensed User Longtime User May 3, 2020 #16 Nkalampika said: if there is also another camera with the functions i want ... i will use it Click to expand... A bit difficult to guess what you want. You should use CameraEx or Camera2.
Nkalampika said: if there is also another camera with the functions i want ... i will use it Click to expand... A bit difficult to guess what you want. You should use CameraEx or Camera2.
Nkalampika Active Member Licensed User May 3, 2020 #17 thank you erel I want a camera with the functions: - change the dimensions of the video -the quality - the bitrate ..
thank you erel I want a camera with the functions: - change the dimensions of the video -the quality - the bitrate ..