-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
android 13 camera permissions #1486
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for providing the solution to this.
#1487 contains a cleaned up version, fixing the things I commented on here.
public static PlatformPermission READ_EXTERNAL_STORAGE { get { return Internal.Android._read_media_images(); } } | ||
public static PlatformPermission READ_MEDIA_IMAGES { get { return | ||
Internal.Android._read_media_audio(); } } | ||
public static PlatformPermission READ_MEDIA_AUDIO { get { return | ||
Internal.Android._read_media_video(); } } | ||
public static PlatformPermission READ_MEDIA_VIDEO { get { return | ||
Internal.Android._read_external_storage(); } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a bit strange, like the return values are rotated:
READ_EXTERNAL_STORAGE -> _read_media_images
READ_MEDIA_IMAGES -> _read_media_audio
READ_MEDIA_AUDIO -> _read_media_video
READ_MEDIA_VIDEO -> _read_external_storage
[Foreign(Language.Java)] | ||
public int CheckSDKVersion() | ||
@{ | ||
return android.os.Build.VERSION.SDK_INT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AndroidProperties.BuildVersion
can be used to get this value in Uno
Superseded by #1487 |
@mortend I tested it, but it's not working. I'm getting an error message that says, 'Permissions: Permissions denied,' even though I have all the necessary permissions granted within the app. Something seems to have changed that is causing it to not work with respect to my code. |
@mortend I think the problem is in this validation: |
@mortend In Build Version >= 33, it consistently indicates that the permissions have not been granted, even though they have been. I've reviewed my code, and I've forced it to always return that the permissions are granted... |
This is an approach to solving the permissions problem (#1481). It works but I don't have much knowledge of native code.
I think the code needs to be polished a little.