Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take Picture with AR Kit does not work and also shows a black screen (iOS only, ocurring on some devices) #84

Open
marcolbx opened this issue Jan 27, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@marcolbx
Copy link

marcolbx commented Jan 27, 2022

Description of the bug
When using AR Kit and trying to take a picture, the camera would appear black and would not actually work, since we have a black screen, we assume that the camera stream is not taken correctly. It seems like AR Kit locks the camera and would not allow other plugin to work on it. However, the video camera is actually working on all devices. Which makes us think that the problem could be on the TakePicture process somehow.

The same build was tested on the following devices:
List of devices that DO NOT have the problem
iPad 6 - iOS 13.4
iPad 6- iOS 14.3
iPad 7 - iOS 14.5
iPad Pro 11

List of devices that HAVE the problem:
iPad 8 - iOS 14.4
iPad 8 - iOS 15.3

Reproduction steps

Use AR Kit on your iOS device, make a button with the Take Picture method of the example and try to take a picture.
(Beware that if the problem does not happen, then your device could be on the white list. However if you could add the specs it would be helpful)

Additional info

  • RecordVideo method works perfectly on all devices, we get the camera stream and the video afterwards.
  • The TakePicture method works on all devices if ar kit is not used.

Something that is curious:
working:
iPad 7 : A10 Fusion chip
iPad 6: A10 Fusion chip
iPad Pro 11 (2020): A12Z Bionic chip
not working:
iPad 8: A12 Bionic chip
iPad 8: A12 Bionic Chip

@marcolbx marcolbx added the bug Something isn't working label Jan 27, 2022
@marcolbx
Copy link
Author

marcolbx commented Jan 27, 2022

I did find a workaround but it would be better if we did not use it.
Turn off AR Session before taking a pic and turn it back on after the picture was taken.

@yasirkula
Copy link
Owner

yasirkula commented Jan 27, 2022

It's probably related to two processes not being able to use the camera simultaneously. My theory is that, on working devices, different rear cameras are used for photos and videos (some devices have multiple rear cameras).

Why don't you grab a screenshot from the AR camera in Unity, wouldn't that be the same thing as opening NativeCamera?

@marcolbx
Copy link
Author

the comparison of the devices does not seem to show that there are multiple rear cameras. From iPad 7 to iPad 8 there is almost no difference.

@yasirkula
Copy link
Owner

I see. I unfortunately have no other theories at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants