0

I developed a simple app which makes users to capture a picture and I save the image in a folder based on image captured date. Everything is working good and now I want to use the same app as a PWA.

If I run ionic cordova run browser -l and access the app in mobile browser and click on camera icon to capture image it is throwing error. My question is it possible to use the ionic native plugin to capture and save image in mobile device when opened app from mobile browser? If not what are the alternative steps needed to achieve the same functionality?

halfer
  • 19,824
  • 17
  • 99
  • 186
abhilash reddy
  • 1,546
  • 8
  • 31
  • 53

1 Answers1

0

the ionic cordova run browser -l will not work for PWA, currently exists some approaches to let users use the device camera on PWA's using the html5 capabilities for that like <input type="file" accept="image/*" capture="camera" /> but, with some limitations related with the browsers compatibility and the support to this feature, currently (at July 2018) if you get that this work, an issue knew appears when you add the pwa to home screen on iOS for example. More info about this on: How to access camera on iOS11 home screen web app?

brodriguezs
  • 33
  • 1
  • 6