I have created a PWA app and so far only tested it under desktop browsers (ionic serve). The access to my connected webcam works without any problems. Now I wanted to test the app on my Android mobile phone with Chrome for the first time and transferred the contents of the WWW directory (ionic build --prod) to my app server. The app can be called up and installed, the app icon even appears on the smartphone screen. The corresponding requests (access permissions) appear. As soon as I click on the camera icon, a prompt appears. I give the app permission to access the camera. A green icon then appears in the top Android toolbar, which signals to me that the app has access to the camera! However, the camera screen remains black
I see the 3 icons at the bottom, one on the left for selecting an image from the file system, in the middle the icon for creating a photo, and on the right the icon for changing perspective, if I click on the middle icon, nothing happens. When I click on the icon on the right, nothing happens. When I click on the left icon to select a file, a gallery opens with the photos on the device. Previously, I was also asked for permission to access the gallery. I can select an image file here.
Does anyone have any idea why the camera screen remains black on mobile phone?
And is there a way to open a console on the mobile phone so that I can see the app’s control output? For example, how can I determine whether an exception error has occurred when accessing the camera?
Ionic CLI : 7.1.3 (C:\Users\thoma\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 7.5.3
@angular-devkit/build-angular : 16.2.9
@angular-devkit/schematics : 16.2.9
@angular/cli : 16.2.9
@ionic/angular-toolkit : 10.0.0
Capacitor CLI : 5.5.1
@capacitor/android : not installed
@capacitor/core : 5.5.1
@capacitor/ios : not installed
cordova-res : 0.15.4
native-run : 1.7.3
NodeJS : v18.17.1 (C:\Program Files\nodejs\node.exe)
npm : 9.6.7
OS : Windows 10