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

[Bug] MediaPicker.CapturePhotoAsync() does nothing on OnePlus 7T Pro (popup camera) #2055

Open
Tuytje opened this issue Nov 5, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@Tuytje
Copy link

Tuytje commented Nov 5, 2022

Description

Calling MediaPicker.CapturePhotoAsync() does nothing on a OnePlus 7T Pro (Android), not even an error message can be seen. It is one of the phones with a motorized camera. One expects the camera to pop out of its enclosing, but nothing happens. Not even an errormessage. The method returns with a 'null' value.
In logcat I can see the following:
interaction: PackageSetting{f751fc1 com.tuyware.mycollections/10337} -> PackageSetting{4d18366 com.oneplus.camera/10175} BLOCKED

Steps to Reproduce

  1. Call MediaPicker.CapturePhotoAsync()

Expected Behavior

Camera to pop out, and be able to take a picture

Actual Behavior

The method returns immediatly with a 'null' value. Logcat gives the following:
interaction: PackageSetting{f751fc1 com.tuyware.mycollections/10337} -> PackageSetting{4d18366 com.oneplus.camera/10175} BLOCKED
The same code works on other devices

Basic Information

  • Version with issue: 1.7.3
  • IDE: Visual Studio 2022
  • Platform Target Frameworks:
    • Android: 13
  • Affected Devices: OnePlus 7T Pro
@Tuytje Tuytje added the bug Something isn't working label Nov 5, 2022
@Tuytje
Copy link
Author

Tuytje commented Dec 9, 2022

Anyone looking into this, or having a workaround?

@irongut
Copy link

irongut commented Dec 14, 2022

@Tuytje I notice your device is running Android 13, are you also targetting Android 13 in your project?

There is an issue with Android 13 where the correct permissions are not requested by Xamarin Essentials and this makes the camera unusable if also targetting Android 13. It should request camera permissions then media permissions but does not request the media permissions. My workaround is to target Android 12.1 for now but I will need a proper fix by Nov 2023. See #2041.

@Tuytje
Copy link
Author

Tuytje commented Dec 21, 2022

Thank you for the suggestion.
I have noticed the issue with the Android 13 target, so we are targetting Android 12.1. The camera works on all our test devices, except for the one with the popup camera. It just doesn't do anything, no error even.

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