Search code examples
javascriptcordovablackberrycameragps

Detect Blackberry Z3, Z10, Z30 camera & GPS in Webworks 10 2.2?


I'm using WebWorks 2.2 to develop an HTML5 + javascript application for the Blackberry Z3, Z10 and Z30.

On starting my app, I would like it to detect if a camera is available. Our IT department may or may not disable the camera on selected phones.

I would also like to detect if the GPS is available.

Can someone please help with how to do this via a cordova/webworks plugin and Javascript?

Thanks in advance, Scott


Solution

  • I think this tutorial will help you:

    http://www.html5rocks.com/en/tutorials/getusermedia/intro/

    getUserMedia() has been supported since Chrome 21, Opera 18, and Firefox 17.

    Be aware that not every browser supports it: http://caniuse.com/#feat=stream

    But you just have to try it out.

    (HTML5 available mobile-devices: http://mobilehtml5.org/)