Closed AliShujaatBhatti closed 5 years ago
I'm unable to reproduce this issue as I don't have one of those phones.
What if you replace the "onTouch" method in Camera2Fragment with this: https://gist.github.com/mitchtabian/337e5091b5a44c9b891c77251c5bd1ed
(I've commented out the 'startManualFocus' method)
ok let me try this , and i think so i had already tried this by commenting this function , let me try again and i will tell you
Its Still having the same issue bro , i also commented out the startManualFocus Method but its still the same
Copy the two methods in this gist into the Camera2Fragment.java class. One will replace your current "startManualFocus" method and the other one is a method I just made named "checkDeviceSupportLevel"
https://gist.github.com/mitchtabian/8b33874ce8cfd8c9843c059d3a11aae8
Run the app and click the screen to trigger a focus. Then look at the log and tell me what the output is. It will show one of the cases from the switch statement in the "checkDeviceSupportLevel" method.
bro i toasted that thing , actually android studio is not showing anything in Log i dont know why but i toasted that thing
Note :- it is the third case in your checkDeviceSupportLevel method
--> See This screenShot Below
Sorry the gist was incorrect. I've changed the "checkDeviceSupportLevel" method.
LEGACY is actually the lowest (1/5). So that's likely your problem. The camera2 api is not really supported by that device. You'll need to use the old camera api for devices with API level less than 21. Some devices with API level 21 support the camera2 api, but its not guaranteed.
ohh ok :O tomorrow i will try it on some other Device and thanks for help :)
Let me know how it goes with the other device.
Everything Is Working Fine But When Image Is Captured ( Either Form Back Or Front Camera), it is always A Focused Circle Shape Image
Take A Look At some Screenshots Taken From The App ScreenShot 1:
ScreenShot 2:
ScreenShot 3:
// Now I Think The Problem Is in the startManualFocus() Method, I Tried To made Some Changes In It , but it didn't work For Me
------------- Phone Test Reuslts:-------------------- Device Information: OS Version: 3.10.72(1479799023) OS API Level: 22 Device: QMobile Model (and Product): QMobile i6i (QMobile i6i)
Display Properties : Display Width: 480 Display Height: 854 Aspect Ratio: 1.7791667