ionic-team / pwa-elements

Quality UI experiences for Web APIs that require custom UI (such as media/camera).
https://medium.com/@maxlynch/building-the-progressive-web-app-os-57daebcb69c1
MIT License
168 stars 50 forks source link

Question: is that possible to force the use of PWA elements on Android Capacitor App ? #89

Closed Aarbel closed 2 years ago

Aarbel commented 3 years ago

Problem

The native Camera API make hybrid apps crash on many Android devices cf

Need

Using WebRTC image capture is more stable on Android devices, so is there a way to force use of PWA elements on Android environment ?

jcesarmobile commented 2 years ago

You can use PWA elements directly instead of using Capacitor Camera plugin, check Camera's plugin web implementation if you have doubts/problems. But you can't force Camera plugin to use the web implementation, unless you fork the plugin and remove the native implementation.

Aarbel commented 2 years ago

@jcesarmobile Camera is really not stable for many Android devices (cf the Camera bugs I listed above).

If I provide a fork to Camera plugin with this possible option (ie "don't use camera plugin on Android, use WebRTC instead") will you merge it?

jcesarmobile commented 2 years ago

no

sadly web camera is far from the features the native camera offers and I don't think the issues you mention are so common I explained how to do it in case you want to do it, but it's not something we will do in Camera plugin, after all, this is a separate repository and you can use it instead of camera plugin.

Aarbel commented 2 years ago

@jcesarmobile this issue concerns nearly 50% of Android users, but it's hard to reproduce on simulator as it's a RAM problem.

Most of Android devices have now a too big Camera, in comparison with how the internal specific OS uses the RAM to take pictures. I will test back Camera plugin, but that's really a big thing now in the hybrid ecosystem. Native Cordova Camera plugin makes app crash really often on these devices.