-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 12, moto g42 getPicture not response, no error #859
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
I have users reporting the same or similar issue on a Galaxy S23. I am unable to reproduce the problem myself on an older galaxy |
Following the thread here: #826, I installed this fork: https://github.com/jalios/cordova-plugin-camera/ And my problem was solved. The problem appears to be related to new permission requirements on the latest Android, so older versions do not have the problem. (v7 of the standard apache/cordova-plugin-camera apparently also fixes the problem, but I was unable to use it because I am fixing a very old app on ionic v1 which is pinned to android 10, which is too old for this plugin, but the jalios plugin was able to work for me.) |
@viking2917 I have the latest version of the plugin, which works well on many of my phones running all versions of Android (8, 9, 10, 11, 12, 13). The problem only appears on Motorola G42 with Android 12. I don't know if it's a problem with this specific phone or Motorola G42 in general. |
Sorry I do not have a that device :(
…On Sat, Oct 7, 2023 at 9:23 PM Lerolben ***@***.***> wrote:
@viking2917 <https://github.com/viking2917> I have the latest version of
the plugin, which works well on many of my phones running all versions of
Android (8, 9, 10, 11, 12, 13). The problem only appears on Motorola G42
with Android 12. I don't know if it's a problem with this specific phone or
Motorola G42 in general.
Please let me know if any of you have a G42 with Android 12 and this
plugin works for you.
—
Reply to this email directly, view it on GitHub
<#859 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2VYVJKQN35FMSZBZPM6XDX6JIGJAVCNFSM6AAAAAA5MPHDTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJRHE2DMNZQGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@Lerolben We are having the same problem using the latest version of the plugin. Any news on your side? The device is a Motorola g51 5G in our case. When the device was with Android 11, the pictures were captured without problems, but after the device was updated to Android 12, it works only sometimes. From 10 attempts, only 2 finished successfully. What happens is that after pressing the camera icon (to open camera), most of the time the app shows a white screen and fully reloads the app, so the app home screen is shown. No useful logs are shown in logcat. We have set the CameraOptions quality setting to 70 to try to minimize memory usage, but it doesn't seam to be this problem since the device has enough memory, and older devices, with far less memory, are working OK. We're also using the latest versions ATM of these plugins: These are the devices/emulators we have verified the app is working OK: Sadly, we don't have another Android 12 device to try at the moment… |
We found this:
This is documented here:
We're not sure if maybe that pendingResult.result is what we need to handle to recover the picture data… |
@rideo-eduardmorales Unfortunately, I still haven't found a solution to the problem. In my case the application does not restart. The plugin simply doesn't give any feedback. |
Hello, for me the 'same' probleme with motorola g51. My app crash from plugin after capture picture and restart. Anyone have the same probleme? Beside I have an user experience on motorola g9, the app crash with plugin camera and the phone doesn't restart. He has to plug the phone into power outlet. Anyone have the same probleme? |
using background plugin. The error occurs when you have to exit the app to take a photo and then when you return. I recommend using the background plugin so that when you go to take a photo, you put the app in background mode and when you return, you remove it. |
If the activity gets killed during When the activity gets reloaded it requires reconstructing the webview, which means your web app will also be re-loaded. The JS state is not restored. The response will be available inside the This is likely the case. You can forcefully test this case by enabling developer options on the android device and then enable the This bug report sounds like this is the situation. @Lerolben were you able to confirm this? |
Bug Report
Problem
On android 12 (moto g42)
getPicture
method do nothing. Nothing happens. Nothing shows up. The method returns neither an error nor a success. The phone doesn't freeze. Just tap on my button and nothing happens. The promise is not fulfilled.LogCat shows only this:
To native (Cordova plugin): callbackId: Camera936725130, service: Camera, action: takePicture, actionArgs: [90,0,1,-1,400,0,0,false,true,false,null,0]
I have 2 other phones with android 12, and some phones with androids 9, 10, 11, 13 and everything works fine on them on the same app. I tried repeatedly to install the application, clear data, etc.
What is expected to happen?
The camera should open
What does actually happen?
Nothing
Information
-- 2 other phones with android 12 (Samsung s10, Oppo A54 5g)
-- Some other phones with android: 9, 10, 11, 13
Command or Code
Environment, Platform, Device
Checklist
The text was updated successfully, but these errors were encountered: