Open chernyadev opened 3 years ago
I fixed the code and updated binaries. Could you please try the latest.
I fixed the code and updated binaries. Could you please try the latest.
In android 11, this problem is observed on some devices.
Settings for allowing camera access with file input field are a bit complicated.
https://github.com/gree/unity-webview/tree/acc3c327128d5ffb71d619fb79d08dc16199f03b#file-input-field https://github.com/gree/unity-webview/tree/acc3c327128d5ffb71d619fb79d08dc16199f03b#cameraaudio-permissionfeature
In short, you should
Player Settings/Other Settings/Write Permission
to External (SDCard)
UNITYWEBVIEW_ANDROID_ENABLE_CAMERA
webViewObject.SetCameraAccess(true);
Could you please check these settings?
Settings for allowing camera access with file input field are a bit complicated.
https://github.com/gree/unity-webview/tree/acc3c327128d5ffb71d619fb79d08dc16199f03b#file-input-field https://github.com/gree/unity-webview/tree/acc3c327128d5ffb71d619fb79d08dc16199f03b#cameraaudio-permissionfeature
In short, you should
- set
Player Settings/Other Settings/Write Permission
toExternal (SDCard)
- define
UNITYWEBVIEW_ANDROID_ENABLE_CAMERA
- invoke
webViewObject.SetCameraAccess(true);
Could you please check these settings?
Could you tell me at what point it is better to do this? before launching the application or at the time of creating a webview? it turns out that on xiaomi (11 android) and samsung (11 android) the camera works correctly, but on realme and zte it does not work
How far does the app go? Can you see a popup like the following when you tap a file input button?
How far does the app go? Can you see a popup like the following when you tap a file input button?
I see this window, I can open the camera, take a photo, but when I click the confirmation icon, "Camera error, unable to save photo or video" appears
Thank you for the report. I investigated further and introduced a fix for Android 7 or later in #743 . Could you please try the latest?
Android 10 camera won't launch, on Android 11 devices where the camera didn't launch now crashes. But if you first open "Files" and then "Camera", then everything works fine on Android 11. I experimented: if I add uses-permission android: name = "android.permission.MANAGE_EXTERNAL_STORAGE" in the manifest and give permissions to all files, it works on android 11, but if I cancel the photo, then the next time I open the camera, the app crashes.
Could you please upload the sample app project that reproduce the issue? I would like to check various settings, the unity version, etc. to reproduce issues. Could you please also upload adb logcat
output when any crash happened? It would be a clue to figure out the cause.
Thank you for those files. Though I couldn't reproduce the issue on my OSCAL Pad 8 (Android 11, https://www.devicespecifications.com/en/model/8edb570f ), I found a similar behavior on emulator. I adjusted the logic and the build process in https://github.com/gree/unity-webview/pull/745 and https://github.com/gree/unity-webview/pull/744 so could you please try the latest? Please note the latest binaries don't contain Assets/Plugins/Android/core-1.6.0.aar (instead it contains Assets/Plugins/Android/core-1.6.0.aar.tmpl) so you need to remove Assets/Plugins/Android/core-1.6.0.aar.
BTW, the log you sent seems to show some native code crash. This might happen because of graphics driver's instability. If OpenGLES3 is sufficient for your project, limiting the graphics api to OpenGLES3 could also help bring stability.
Thanks, everything works fine now
After recent updates, the camera stopped working again
Thank you for those files. Though I couldn't reproduce the issue on my OSCAL Pad 8 (Android 11, https://www.devicespecifications.com/en/model/8edb570f ), I found a similar behavior on emulator. I adjusted the logic and the build process in #745 and #744 so could you please try the latest? Please note the latest binaries don't contain Assets/Plugins/Android/core-1.6.0.aar (instead it contains Assets/Plugins/Android/core-1.6.0.aar.tmpl) so you need to remove Assets/Plugins/Android/core-1.6.0.aar.
BTW, the log you sent seems to show some native code crash. This might happen because of graphics driver's instability. If OpenGLES3 is sufficient for your project, limiting the graphics api to OpenGLES3 could also help bring stability. After recent updates, the camera stopped working again
How doesn't it work? Changes since the last time are the followings:
https://github.com/gree/unity-webview/compare/81d56f3...ffbf3c1
and they don't contain any change directly related to camera. The sample app and its binary that runs on my devices can be found in the following, so could you please try it.
https://github.com/gree/unity-webview/issues/751#issuecomment-969999711 (https://github.com/gree/unity-webview/tree/992d2006ae1503f1df44a1fef69d774fcd95acf0/sample is for 2020.3.22f1, which can be easily upgraded to 2021.x).
Hello. All the same, camera crashes are observed, the latest version of the plug-in and your Sample are used. If the crash didn't work the first time, you can reset the app and try again. Apk and logs: https://drive.google.com/file/d/1KDOL5sFedvnGuR3FX9FXrku17DWGa9dl/view?usp=sharing
Do I have a plugin with android native functionality? in it, the camera works fine, if I can throw it off for comparison.
Your app worked okay on my devices.
I couldn't test further as a sort of reCAPTCHA was displayed and I couldn't input Cyrillic glyphs.
Your log contains some vulkan-related messages so I guess you enabled vulkan for your app. As vulkan is rather unstable on some devices, disabling it could help.
Hello!
I've faced an issue accessing file uploading dialogue on Android 10+ devices (works perfectly for lover versions). I only can attach files from the gallery but am not able to take new pictures. It seems to be related to issues described on Stackoverflow:
Please let me know if that problem could be resolved with any kind of manifest magic or I'm doing something wrong. Thank you in advance!
Best regards!