Search code examples
web-applicationscordovasmartphone

Options for making _web_ apps using smartphone and ipad cameras


I am currently considering if this is possible to do as a web app (not native app or phone gap app, but a javascript/HTML5 app running in the smartphone/tablet browser):

  1. User takes a picture
  2. User shares picture on a server with a comment.

As far as I know, a web app has no access to the device's camera or camera roll, so what are my options then ?

My best idea currently is to have a mail service, where the users can send the photo as a mail, so my questions are:

1) Am I right in my asumptions? 2) Any better ideas than a mail service? 3) If I decided to go the native way, will it be possible to make a phonegap app with access to the camera and photos?


Solution

  • Yes, you can create a web application that has access to the device's camera roll. There is a catch, though. While photo uploading works with Android, it currently does not work on the stock iOS Safari browser. Users would have to download another browser to be able to upload images (I believe the iCab browser allows uploading). This could be a deal-breaker depending on who your users will be. If you're building for the public, you can't very well tell them to use a different browser. If you're building internal apps, you could probably get away with it.

    Here's an example of such an app, which seems to be exactly what you're trying to accomplish: http://www.crazybikes.com/mrcjava/servlet/CBB2E.M07050s

    One thing to note: That example application appears different depending on the device used to access it. In other words, if visit the app on a PC, it will look like a PC app. But, if you visit it from a smartphone, it will look like a smartphone app. To get the full experience, I'd suggest visiting it from a smartphone.