mitchtabian / TabianCustomCamera

Custom camera for android using camera2 api (DEPRECATED)
152 stars 66 forks source link

Example Issue #1

Closed mitchtabian closed 6 years ago

mitchtabian commented 6 years ago

My camera preview isn't fitting the screen. For some reason there's a space at the bottom.

Take a look at this screen shot: samsung selfie cutoff

Here's what I think the problem is: ......nlksgnkgnklg

Here's some troubleshooting that I've done: ....f.sdfskbgfskldgkslgk

Phone test results:

06-11 15:07:47.546 5910-5910/? I/app_process: The ClassLoaderContext is a special shared library.

                                          [ 06-11 15:07:47.565  5641: 5641 D/         ]
                                          ----------- Device Information ----------- 

                                           OS Version: 4.4.78-perf+(1)
                                           OS API Level: 27
                                           Device: OnePlus5
                                           Model (and Product): ONEPLUS A5000 (OnePlus5)

                                          [ 06-11 15:07:47.565  5641: 5641 D/         ]
                                          ----------- Display Properties ----------- 

                                           Display Width: 1080
                                           Display Height: 1920
                                           Aspect Ratio: 1.7777778
VattipalliSridhar commented 6 years ago

06-29 15:19:34.687 19819-19869/codingwithmitch.com.tabiancustomcamera E/AndroidRuntime: FATAL EXCEPTION: CameraBackground Process: codingwithmitch.com.tabiancustomcamera, PID: 19819 java.lang.NullPointerException: Attempt to invoke virtual method 'int android.util.Size.getWidth()' on a null object reference at codingwithmitch.com.tabiancustomcamera.Camera2Fragment.createCameraPreviewSession(Camera2Fragment.java:972) at codingwithmitch.com.tabiancustomcamera.Camera2Fragment.access$1900(Camera2Fragment.java:86) at codingwithmitch.com.tabiancustomcamera.Camera2Fragment$7.onOpened(Camera2Fragment.java:940) at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:118) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.os.HandlerThread.run(HandlerThread.java:61)

mitchtabian commented 5 years ago

Did you watch the video?

On Wed., Apr. 17, 2019, 5:24 a.m. Vasudev Vyas, notifications@github.com wrote:

Integrating ScalingTextureView in my Application it is not calling ScaliingSurfaceListener and not showing preview. it is giving me no "there is no surface". If I assign Simple TextureView it is working but if I am using ScalingTextureView I can only see black screen no surface view. :(. help me out, please.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/mitchtabian/TabianCustomCamera/issues/1#issuecomment-484060540, or mute the thread https://github.com/notifications/unsubscribe-auth/AQo2UGss0wp-EZy_0-E_zlpen4oQct2Rks5vhxJkgaJpZM4Ujeh_ .