GithubHelp home page GithubHelp logo

camerakit / camerakit-android Goto Github PK

View Code? Open in Web Editor NEW
5.3K 158.0 874.0 21.33 MB

Library for Android Camera 1 and 2 APIs. Massively increase stability and reliability of photo and video capture on all Android devices.

Home Page: https://camerakit.io

License: MIT License

Java 36.18% Shell 0.01% CMake 0.22% C++ 7.32% C 48.10% Kotlin 8.17%
java captured-images camera camera-api capture-video android android-library ndk c-plus-plus performance

camerakit-android's Introduction

CameraKit Header

Google Play Link Join Spectrum Buddy.Works

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.

Sponsored By

Expensify Buddy.Works

Trusted By

InFitting GooseChase Alpha Apps Expensify

 

Get The Most From CameraKit

There are currently two versions of CameraKit that we support, v1.0.0-beta3.X and v0.13.X.

If photo is your only need, try out the latest and greatest CameraKit features with v1.0.0-beta3.11. Our beta3.11 release does not yet support video, but that feature is coming!

In the meantime, if your application requires video we recommend sticking with v0.13.4; the latest stable release with video implementation.

Use Case Version Notes Documentation Link
Photo only v1.0.0-beta3.11 The latest and greatest CameraKit has to offer. Video support coming soon! camerakit.io/docs/beta3.11
Photo and Video v0.13.4 Stable build with full photo and video support camerakit.io/docs/0.13.4

Documentation Site

Setup instructions for 1.0.0-beta3.11 are below. To see the full documentation head over to our website, camerakit.io/docs.

Setup

To include CameraKit in your project, add the following to your app level build.gradle.

dependencies {
    implementation 'com.camerakit:camerakit:1.0.0-beta3.11'
    implementation 'com.camerakit:jpegkit:0.1.0'
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.0'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0'
}

Usage

Create a CameraKitView in your layout as follows:

<com.camerakit.CameraKitView
    android:id="@+id/camera"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:adjustViewBounds="true"
    android:keepScreenOn="true"   <!-- keep screen awake while CameraKitView is active -->
    app:camera_flash="auto"
    app:camera_facing="back"
    app:camera_focus="continuous"
    app:camera_permissions="camera" />

Then create a new CameraKitView object in your Activity and override the following methods.

private CameraKitView cameraKitView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    cameraKitView = findViewById(R.id.camera);
}

@Override
protected void onStart() {
    super.onStart();
    cameraKitView.onStart();
}

@Override
protected void onResume() {
    super.onResume();
    cameraKitView.onResume();
}

@Override
protected void onPause() {
    cameraKitView.onPause();
    super.onPause();
}

@Override
protected void onStop() {
    cameraKitView.onStop();
    super.onStop();
}

@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    cameraKitView.onRequestPermissionsResult(requestCode, permissions, grantResults);
}

ProGuard

If using ProGuard, add the following rules:

-dontwarn com.google.android.gms.**
-keepclasseswithmembers class com.camerakit.preview.CameraSurfaceView {
    native <methods>;
}

License

CameraKit is MIT License

camerakit-android's People

Contributors

4brunu avatar andreidiaconu avatar andrewcross avatar andrewgable avatar android-dataticket avatar anpez avatar asood123 avatar austinkettner avatar calebdre avatar capezzbr avatar dogs-never-lie avatar dwillmc avatar elevenfive avatar emersoncloud avatar eomine avatar fab1ano avatar gasoline-joe avatar jonvieira avatar kishanthan avatar larryng avatar muratgu avatar namaskar-1f64f avatar nethergrim avatar noln avatar nullptr2this avatar shehabic avatar stefanvasilev avatar suomi35 avatar vanhoangtran avatar yperess avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

camerakit-android's Issues

Can't record videos longer than 14 seconds

I've implemented CameraKit in my app and works great, the only problem I had was while recording videos of 30 seconds, more or less, the output video file lasts between 11 and 14 seconds. Any idea why? Sorry for any mistakes in my english.

Thanks in advance.

Video Capture Issue

While attempting to capture video through onVideoCaptured the file parameter video points to a directory that does not exist, and cannot be played through VideoView. When I try and access the video through VideoView it outputs a java.io.FileNotFoundException, and I'm not sure what is going on here.

ConcurrentModificationException when starting camera

Sometimes the library will throw this error when starting. My setting is:
Fragment 1 (No camera view), Fragment 2 (Camera View).

When you transit between these fragments it works just fine and stops/starts camera, but eventually it will crash the app. Might be related to not killing handlers properly when stopping?

Stacktrace:

03-31 09:48:01.920 22438-23468/[REDACTED] E/AndroidRuntime: FATAL EXCEPTION: Thread-1326
      Process: [REDACTED], PID: 22438
      java.util.ConcurrentModificationException
          at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:346)
          at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:366)
          at android.hardware.Camera$Parameters.flatten(Camera.java:2830)
          at android.hardware.Camera.setParameters(Camera.java:2019)
          at com.flurgle.camerakit.Camera1.setFlash(Camera1.java:136)
          at com.flurgle.camerakit.Camera1.adjustCameraParameters(Camera1.java:367)
          at com.flurgle.camerakit.Camera1.openCamera(Camera1.java:308)
          at com.flurgle.camerakit.Camera1.start(Camera1.java:82)
          at com.flurgle.camerakit.CameraView$2.run(CameraView.java:160)
          at java.lang.Thread.run(Thread.java:818)

EDIT: forgot to mention device settings:

  • LG K430 (K10)
  • Android 6.0

Problems on LG G3

Hi,
Thanks for putting this project together. Previously I had to deal with the Camera2 API and it's just a nightmare so I highly appreciate every project like this. However the demo app is not working perfectly on my LG G3 (D855). When I press the "camera turn" button the app closes and give a message that "Unfortunately, CameraKit has stopped." The other thing is the flashlight button: it does not turn on the flashlight. I know these statements are very generic but I don't know what else I could provide. I hope this helps a little.

Make FocusMarkerLayout used in demo to be a part of library

I started testing Tap to focus and found implementation of FocusMarkerLayout to be rather useful and I think it probably would be a good idea to make it a part of library. Please share your opinion and if you are agree I'll be able to create pull request for this.

RuntimeException in Tap to focus

Thanks a lot for a great library! I mentioned that you have added Tap To focus and decided to test it. I was able to get RuntimeException thrown on my Nexus 4 running Android 5.0.1. When I tap rather fast on item which is really close to camera and then to item which is far away. I got following:

03-17 16:15:50.295 20219-20219/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.flurgle.camerakit.demo, PID: 20219
java.lang.RuntimeException: setParameters failed
at android.hardware.Camera.native_setParameters(Native Method)
at android.hardware.Camera.setParameters(Camera.java:1876)
at com.flurgle.camerakit.Camera1$4.onTouch(Camera1.java:459)
at android.view.View.dispatchTouchEvent(View.java:8465)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2427)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2106)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2369)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1719)
at android.app.Activity.dispatchTouchEvent(Activity.java:2742)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:71)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2330)
at android.view.View.dispatchPointerEvent(View.java:8666)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4123)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3989)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3544)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3597)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3563)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3680)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3571)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3737)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3544)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3597)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3563)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3571)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3544)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5807)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5781)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5752)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5897)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:143)
at android.os.Looper.loop(Looper.java:122)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.jav

                                               --------- beginning of system

Tap to focus is not working.

I have put "app:ckFocus="tap"" in xml, but still tap to focus is not working, if possible please check and fix the issue.

Crash on launching Front camera preview - Nexus 6

Hi!

Facing next crash on Nexus 6, during start of camera preview.

Android 6.0.1 (stock firmware).

Fatal Exception: java.lang.IllegalArgumentException: Invalid rotation=450 at android.hardware.Camera$Parameters.setRotation(Camera.java:3140) at com.flurgle.camerakit.Camera1.adjustCameraParameters(Camera1.java:347) at com.flurgle.camerakit.Camera1.access$200(Camera1.java:25) at com.flurgle.camerakit.Camera1$1.onSurfaceChanged(Camera1.java:60) at com.flurgle.camerakit.PreviewImpl.dispatchSurfaceChanged(PreviewImpl.java:37) at com.flurgle.camerakit.TextureViewPreview.dispatchSurfaceChanged(TextureViewPreview.java:84) at com.flurgle.camerakit.TextureViewPreview$1.onSurfaceTextureAvailable(TextureViewPreview.java:28) at android.view.TextureView.getHardwareLayer(TextureView.java:368) at android.view.View.updateDisplayListIfDirty(View.java:15157) at android.view.View.draw(View.java:15954) at android.view.ViewGroup.drawChild(ViewGroup.java:3609) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399) at android.view.View.updateDisplayListIfDirty(View.java:15175) at android.view.View.draw(View.java:15954) at android.view.ViewGroup.drawChild(ViewGroup.java:3609) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399) at android.view.View.updateDisplayListIfDirty(View.java:15175) at android.view.View.draw(View.java:15954) at android.view.ViewGroup.drawChild(ViewGroup.java:3609) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399) at android.view.View.updateDisplayListIfDirty(View.java:15175) at android.view.View.draw(View.java:15954) at android.view.ViewGroup.drawChild(ViewGroup.java:3609) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399) at android.view.View.updateDisplayListIfDirty(View.java:15175) at android.view.View.draw(View.java:15954) at android.view.ViewGroup.drawChild(ViewGroup.java:3609) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399) at android.view.View.updateDisplayListIfDirty(View.java:15175) at android.view.View.draw(View.java:15954) at android.view.ViewGroup.drawChild(ViewGroup.java:3609) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399) at android.view.View.updateDisplayListIfDirty(View.java:15175) at android.view.View.draw(View.java:15954) at android.view.ViewGroup.drawChild(ViewGroup.java:3609) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399) at android.view.View.updateDisplayListIfDirty(View.java:15175) at android.view.View.draw(View.java:15954) at android.view.ViewGroup.drawChild(ViewGroup.java:3609) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399) at android.view.View.updateDisplayListIfDirty(View.java:15175) at android.view.View.draw(View.java:15954) at android.view.ViewGroup.drawChild(ViewGroup.java:3609) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399) at android.view.View.draw(View.java:16187) at com.android.internal.policy.PhoneWindow$DecorView.draw(PhoneWindow.java:2690) at android.view.View.updateDisplayListIfDirty(View.java:15180) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:281) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:287) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:322) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2615) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2434) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2067) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858) at android.view.Choreographer.doCallbacks(Choreographer.java:670) at android.view.Choreographer.doFrame(Choreographer.java:606) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Config:

    setFacing(CameraKit.Constants.FACING_FRONT);
    setFlash(CameraKit.Constants.FLASH_OFF);
    setFocus(CameraKit.Constants.FOCUS_CONTINUOUS);
    setMethod(CameraKit.Constants.METHOD_STILL);
    setCropOutput(true);
    setJpegQuality(100);

Version:

compile 'com.flurgle:camerakit:0.9.13'

Flash fires too early

Hi,

when I use the flash for taking pictures it fires too early, so all my pictures get dark.

I use this line of code to turn on the flash:
cameraView.setFlash(CameraKit.Constants.FLASH_ON);

and this to take the picture:
cameraView.captureImage();

Please help!

Wrong photo rotation

I replaced a lot of complicated code I used with CameraKit. While testing the new implementation, I discovered that output photos are rotated 90 degreees clockwise on my Samsung Galaxy S4. Nexus 5 on the other hand, has no problem.

great library, I love it.

Crash when switching to Front Camera

Play store Application is getting crashed when switching Front Face Camera from option

Device Information

Brand: Google
DeviceModel: Nexus 5
Product: hammerhead
Manufacturer: LGE
Android Version: 6.0.1

Crash Logs

FATAL EXCEPTION: main
Process: com.flurgle.camerakit.demo, PID: 10110 java.util.NoSuchElementException
at java.util.TreeMap.lastKey(TreeMap.java:630)
at java.util.TreeSet.last(TreeSet.java:272)
at com.flurgle.camerakit.Camera1.getPreviewResolution(Camera1.java:261)
at com.flurgle.camerakit.Camera1.adjustCameraParameters(Camera1.java:333)
at com.flurgle.camerakit.Camera1.openCamera(Camera1.java:292)
at com.flurgle.camerakit.Camera1.start(Camera1.java:74)
at com.flurgle.camerakit.Camera1.setFacing(Camera1.java:108)
at com.flurgle.camerakit.CameraView.setFacing(CameraView.java:163)
at com.flurgle.camerakit.CameraView.toggleFacing(CameraView.java:198)
at com.flurgle.camerakit.demo.MainActivity.toggleCamera(MainActivity.java:148)
at com.flurgle.camerakit.demo.MainActivity_ViewBinding$5.doClick(MainActivity_ViewBinding.java:88)
at butterknife.internal.DebouncingOnClickListener.onClick(DebouncingOnClickListener.java:22)
at android.view.View.performClick(View.java:5204)
at android.view.View$PerformClick.run(View.java:21153)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

How to reproduce this issue.

  • Download Application From Google Play Store

  • Open Application give permissions and switch camera to Front Face, As soon as you click button application is crashed

Demo video?

Maybe I just haven't figured out how to use the demo properly, but why doesn't the demo showcase the video capture capabilities of this library?

bug(focus): Tap to focus get immediately reset after focus

Thanks for this nice library. I saw you recently added tap to focus and it worked like charm.
But after tap to focus and the area got the focus, the focus immediately get lost after that.

I notice in Camera1.java#L466 the focus mode will be reset immediately after the focus was set. It would be better to have some time to take a picture before the focus got lost.

So you can add an handler to reset the focus after a period of time see com/android/camera/Camera.java#835 for an example.

regards,
david

Pinch to zoom is not working

It seems like "Pinch to Zoom" is not working.

Calling camera.setZoom(CameraKit.Constants.ZOOM_PINCH); doesn't work.

Can you resolve this issue quickly.

orientation problems

换不同的角度去拍照不能保持照片正向显示,另外,横屏下拍照得到的照片角度也有问题。
For different angles to take pictures can not keep the photo positive display, in addition, the horizontal screen to take pictures of the photo angle is also a problem.

Crash when tap to focus

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.flurgle.camerakit.demo, PID: 16874 java.lang.RuntimeException: setParameters failed at android.hardware.Camera.native_setParameters(Native Method) at android.hardware.Camera.setParameters(Camera.java:3028) at com.flurgle.camerakit.Camera1$4.onTouch(Camera1.java:515) at android.view.View.dispatchTouchEvent(View.java:9422) at com.flurgle.camerakit.CameraView$2.onTouch(CameraView.java:131) at android.view.View.dispatchTouchEvent(View.java:9422) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2660) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2304) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2666) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2318) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2666) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2318) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2666) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2318) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2666) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2318) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2666) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2318) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2666) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2318) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2666) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2318) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2666) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2318) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2666) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2318) at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2490) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1783) at android.app.Activity.dispatchTouchEvent(Activity.java:2818) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:71) at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2451) at android.view.View.dispatchPointerEvent(View.java:9668) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4870) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4728) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4233) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4286) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4252) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4398) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4260) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4455) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4233) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4286) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4252) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4260) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4233) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6698) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6672) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6604) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6893) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:328) at android.os.Looper.loop(Looper.java:164)

wrong file name: AutoUnFocusEditText

I just cloned the repo to find out why #2 is happening. In the current state you cannot compile, because the class AutoUnFocusEditText is not named correctly.

class name: AutoUnFocusEditText
file name: AutoUnfocusEditText

crash when selecting photo uri in landscape

taking a picture, then clicking on the picture that was saved to view it as uri - this will cause NPE if the device is being held in landscape mode. does not crash if the device is being held in portrait.. also we need a way to set orientation and be sure the photo always snaps at that rotation, please keep up the good work i'm relying on this lib now because i like it and it shows more promise than cameraview

java.lang.NullPointerException: Attempt to invoke virtual method 'int com.flurgle.camerakit.Size.getHeight()' on a null object reference
at com.flurgle.camerakit.CameraView.onMeasure(CameraView.java:136)
at android.view.View.measure(View.java:20171)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:20171)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:747)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
at android.view.View.measure(View.java:20171)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1111)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:631)
at android.view.View.measure(View.java:20171)
at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1658)
at android.view.View.measure(View.java:20171)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:747)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
at android.view.View.measure(View.java:20171)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:716)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:462)
at android.view.View.measure(View.java:20171)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:139)
at android.view.View.measure(View.java:20171)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:20171)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:20171)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:20171)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:3143)
at android.view.View.measure(View.java:20171)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2644)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2350)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1487)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7450)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920)
at android.view.Choreographer.doCallbacks(Choreographer.java:695)
at android.view.Choreographer.doFrame(Choreographer.java:631)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7237)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Crashed on multiple devices when opening an application

Application crashed when opening the application & give the permission.

Devices Information

Brand: Samsung
Device Model: Galaxy S6
Product: SM-G290V
Manufacturer: Samsung
Android Version: 6.0.1

Brand: Samsung
Device Model: Note 5
Product: SM-N920A
Manufacturer: Samsung
Android Version: 5.1.1

Brand: Motorola
Device Model: Droid turbo
Manufacturer: Motorola
Android Version: 6.0.1

Crash Logs

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.flurgle.camerakit.demo, PID: 14283
java.lang.RuntimeException: Unable to resume activity {com.flurgle.camerakit.demo/com.flurgle.camerakit.demo.MainActivity}: java.util.NoSuchElementException
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4156)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4250)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3361)
at android.app.ActivityThread.access$1100(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.util.NoSuchElementException
at java.util.TreeMap.lastKey(TreeMap.java:630)
at java.util.TreeSet.last(TreeSet.java:272)
at com.flurgle.camerakit.Camera1.getPreviewResolution(Camera1.java:261)
at com.flurgle.camerakit.Camera1.adjustCameraParameters(Camera1.java:333)
at com.flurgle.camerakit.Camera1.openCamera(Camera1.java:292)
at com.flurgle.camerakit.Camera1.start(Camera1.java:74)
at com.flurgle.camerakit.CameraView.start(CameraView.java:151)
at com.flurgle.camerakit.demo.MainActivity.onResume(MainActivity.java:95)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1286)
at android.app.Activity.performResume(Activity.java:6987)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4145)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4250) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3361) 
at android.app.ActivityThread.access$1100(ActivityThread.java:222) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:158) 
at android.app.ActivityThread.main(ActivityThread.java:7229) 
at java.lang.reflect.Method.invoke(Native Method) 

How to reproduce this issue.

  • Download Application From Google Play Store

  • Open Application give permissions then crashed occurred.

Back camera is being shown sometimes, instead of front camera.

Hi!

My current setup:
setFacing(CameraKit.Constants.FACING_FRONT);
setFlash(CameraKit.Constants.FLASH_OFF);
setFocus(CameraKit.Constants.FOCUS_CONTINUOUS);
setMethod(CameraKit.Constants.METHOD_STILL);
setCropOutput(true);
setJpegQuality(100);

Sometimes (1 from 100 or 200) preview of back camera is being displayed instead of front camera.

Also front camera is set in xml:

<com.beyondar.android.view.CameraKitView
android:id="@+id/camera"
camerakit:ckFacing="front"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

however it doesn't help.

Any ideas? :)

Memory leak while recording video

Thanks for your cool project that saved a lot of my time.
I found a memory leak issue on recording video, as the logs:

03-30 08:28:02.603: E/AudioFlinger(323): not enough memory for AudioTrack size=65600
03-30 08:28:02.603: D/MemoryDealer(323): AudioTrack (0xab3f43b0, size=1048576)
03-30 08:28:02.603: D/MemoryDealer(323): 0: 0xab3f43c8 | 0x00000000 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 1: 0xab3f4dc0 | 0x00010040 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 2: 0xab4ab660 | 0x00020080 | 0x00001040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 3: 0xab3eceb8 | 0x000210C0 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 4: 0xab3ecf88 | 0x00031100 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 5: 0xab4ea978 | 0x00041140 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 6: 0xab415d00 | 0x00051180 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 7: 0xab49a0d8 | 0x000611C0 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 8: 0xab3f04b0 | 0x00071200 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 9: 0xab4af9a8 | 0x00081240 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 10: 0xab501368 | 0x00091280 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 11: 0xab59c7d8 | 0x000A12C0 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 12: 0xab403700 | 0x000B1300 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 13: 0xab403a60 | 0x000C1340 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 14: 0xab667e78 | 0x000D1380 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 15: 0xab648700 | 0x000E13C0 | 0x00010040 | A
03-30 08:28:02.603: D/MemoryDealer(323): 16: 0xab713f60 | 0x000F1400 | 0x0000EC00 | F
03-30 08:28:02.603: D/MemoryDealer(323): size allocated: 988160 (965 KB)
03-30 08:28:02.603: E/AudioFlinger(323): createRecordTrack_l() initCheck failed -12; no control block?
03-30 08:28:02.603: E/AudioRecord(323): AudioFlinger could not create record track, status: -12

It caused native error that let camera not available utils you reboot your device.
The mMediaRecorder.release() should be called in endVideo().

Tap To Focus doesn't work at all on Samsung Galaxy S7 (Android 7.0)

The main cause of tap to focus not working is this condition
https://github.com/gogopop/CameraKit-Android/blob/master/camerakit/src/main/api16/com/flurgle/camerakit/Camera1.java#L504
as getMaxNumFocusAreas should also be considered, in order for it to work well on almost all devices, it should be handled this way:
(This is a fork of Open Camera)
https://github.com/shehabic/OpenCamera/blob/1802e75b2d57bf73884e94051ec2230a6d4979d7/app/src/main/java/net/sourceforge/opencamera/CameraController/CameraController1.java#L1090

Only first 6 seconds of video are saved to storage

I tried on both the Nexus 5X (7.1) and the LG K8 (6.0).

I do exactly as in the example:

cameraView.startRecordingVideo();
cameraView.postDelayed(new Runnable() {
    @Override
    public void run() {
        cameraView.stopRecordingVideo();
    }
}, 30*1000);

onVideoTaken gets called after 30 seconds, just like I want it. But regardless, only the first 6 seconds of the video are saved to storage.

Camera preview not showing

Camera preview not showing on Google Nexus 5 device. Receiving the error Nexus 5 is blacklisted for OpenSL ES usage! Viewing a blank screen. Only on Nexus5.

Crash when setting Camera Parameters

This crash is very random. So when you call adjustCameraParameters() it crashes either when you set Flash or set Focus or sometime when you set Preview.

Its a null pointer exception

Attempt to write to field 'java.util.LinkedHashMap$LinkedEntry java.util.LinkedHashMap$LinkedEntry.prv' on a null object reference.

I imported this as a library so have the latest changes.

Samsung image flipped (mirrored)

Device: Samsung Galaxy J1 Android 4.4.4 - using back camera

After taking the photo, the photo is saved in mirroring view, for example, when the user is taking a photo of a picture that has window on the left side, then on the device, the picture have the window on the right side.

Preview displays things correctly.

NPE when resuming app

device Galaxy S4 - 5.0.1

app was behind lockscreen. When I unlocked the phone, NPE occurred.
03-02 19:39:46.276 23113-23113/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.anaface.anaface, PID: 23113 java.lang.NullPointerException: Attempt to invoke virtual method 'int com.flurgle.camerakit.Size.getHeight()' on a null object reference at com.flurgle.camerakit.CameraView.onMeasure(CameraView.java:135) at android.view.View.measure(View.java:18580) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:728) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:464) at android.view.View.measure(View.java:18580) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1658)

RECORD_AUDIO permission when used only for taking pictures

Hello. First of thx for this great library, it helps with the custom camera integrations immensely.

Is it possible somehow to set the camera to picture-only mode, and then not request the permission android.permission.RECORD_AUDIO? At the moment I see that in the code under requestCameraPermission() both android.permission.CAMERA and android.permission.RECORD_AUDIO are requested. This can be a problem if the user is expecting that the application is only taking pictures for example.

I can also do a PR if you think it's worth supporting such scenario, or otherwise the hosting activity can handle this before calling the .start().

activity screenOrientation="landscape" Preview distort

in demo
step1 : in AndroidManifest.xml set MainActivity
android:screenOrientation="landscape"

step2: in activity_main.xml set CameraView
android:layout_width="match_parent"
android:layout_height="1024dp"

run app -> Preview landscape orientation

if i removed configureTransform methed in TextureViewPreview.java
my device the preview distort

please help me thanks

Picture rotate on the Sumsung phone.

Hi, this libs really helps a lot, thanks.
But the picture I take within the app, it will rotate -90 on Sumsung phones.
And usully I can get the Exif info with the rotation, but I can't get the rotations with this libs, really confuse me..
So if you have time, please check this out?
By the way, the sumsung phone is SM-G900F and Api 21

java.lang.RuntimeException: Method called after release()

java.lang.RuntimeException: Method called after release()
at android.hardware.Camera.native_setParameters(Native Method)
at android.hardware.Camera.setParameters(Camera.java:2550)
at com.flurgle.camerakit.Camera1.setFlash(Camera1.java:136)
at com.flurgle.camerakit.Camera1.adjustCameraParameters(Camera1.java:367)
at com.flurgle.camerakit.Camera1.access$200(Camera1.java:29)
at com.flurgle.camerakit.Camera1$1.onSurfaceChanged(Camera1.java:68)
at com.flurgle.camerakit.PreviewImpl.dispatchSurfaceChanged(PreviewImpl.java:37)
at com.flurgle.camerakit.TextureViewPreview.dispatchSurfaceChanged(TextureViewPreview.java:84)
at com.flurgle.camerakit.TextureViewPreview$1.onSurfaceTextureAvailable(TextureViewPreview.java:28)
at android.view.TextureView.getHardwareLayer(TextureView.java:385)
at android.view.View.getDisplayList(View.java:13554)
at android.view.View.getDisplayList(View.java:13641)
at android.view.View.draw(View.java:14436)
at android.view.ViewGroup.drawChild(ViewGroup.java:3252)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3070)
at android.view.View.getDisplayList(View.java:13586)
at android.view.View.getDisplayList(View.java:13641)
at android.view.View.draw(View.java:14436)
at android.view.ViewGroup.drawChild(ViewGroup.java:3252)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3070)
at android.view.View.getDisplayList(View.java:13586)
at android.view.View.getDisplayList(View.java:13641)
at android.view.View.draw(View.java:14436)
at android.view.ViewGroup.drawChild(ViewGroup.java:3252)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3070)
at android.view.View.getDisplayList(View.java:13586)
at android.view.View.getDisplayList(View.java:13641)
at android.view.View.draw(View.java:14436)
at android.view.ViewGroup.drawChild(ViewGroup.java:3252)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3070)
at android.view.View.draw(View.java:14745)
at android.widget.FrameLayout.draw(FrameLayout.java:534)
at android.view.View.getDisplayList(View.java:13594)
at android.view.View.getDisplayList(View.java:13641)
at android.view.View.draw(View.java:14436)
at android.view.ViewGroup.drawChild(ViewGroup.java:3252)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3070)
at android.view.View.getDisplayList(View.java:13586)
at android.view.View.getDisplayList(View.java:13641)
at android.view.View.draw(View.java:14436)
at android.view.ViewGroup.drawChild(ViewGroup.java:3252)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3070)
at android.view.View.getDisplayList(View.java:13586)
at android.view.View.getDisplayList(View.java:13641)
at android.view.View.draw(View.java:14436)
at android.view.ViewGroup.drawChild(ViewGroup.java:3252)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3070)
at android.view.View.getDisplayList(View.java:13586)
at android.view.View.getDisplayList(View.java:13641)
at android.view.View.draw(View.java:14436)
at android.view.ViewGroup.drawChild(ViewGroup.java:3252)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3070)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchDraw(PhoneWindow.java:2387)
at android.view.View.draw(View.java:14745)
at android.widget.FrameLayout.draw(FrameLayout.java:534)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2367)
at android.view.View.getDisplayList(View.java:13594)
at android.view.View.getDisplayList(View.java:13641)
at android.view.HardwareRenderer$GlRenderer.buildDisplayList(HardwareRenderer.java:1627)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1506)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2722)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2587)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2210)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1189)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6223)
at android.view.Choreographer$Call

Get camerapreview frames

First thanks for this awesome library.

Second, I'm trying to use this library with google vision barcode api, and I'm stucking on how to get the camera preview's frames for the barcode processor. Taking pictures in a Runnable and processing on the onPictureTaken event slows down my app, and sometimes it crashes the Runnable (even using try...catch).

There is a way of hooking into the camera view and get the frames? Or if I can't do that, could you give some adivice on how can I achive this, and maybe making a fork and implementing it?

Toggle facing breaks continuous focus

Steps to reproduce:

  1. Start cameraview with focus set on continuous and facing set on back;
  2. Toggle facing using cameraView.toggleFacing();
  3. Camera does not focus anymore, neither in back or front facing.

Calling cameraView.setFocus(CameraKit.Constants.FOCUS_CONTINUOUS) after toggling does not help.

Landscape preview and video capture

Hi, I'm working on an app which support landscape only. I want to use this awesome library to capture video in landscape mode.

But it seems that this library doesn't support landscape activity, the preview was rotated and distorted.

How to fix this issue?

Camera Record and capture issues

Hi,

There are some issues that I am facing while using this library.

  1. Using permissions, when I approve the permissions and then start the camera. It crashes giving the error - getParameters failed (empty parameters)

  2. After using captureImage - getting crash issue - takePicture Failed

  3. When calling startRecordingVideo(), it crashes with java.lang.RuntimeException: unlock failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.