To use the device camera, we need to access the
Ti.Media namespace, and specifically the
showCamera method. This will display the native operating system interface for taking photographs, and expose the three events that we need to decide what to do with the capture image. We will also check whether the user's device is capable of taking camera shots before we attempt to do all this, as some devices (including iPod Touch and simulators) don't have this capability.
Note that if you're testing on iOS, this recipe will work only if you use a physical device! For Android, you should use the Genymotion simulator (https://www.genymotion.com/) and not the stock Android emulator. Genymotion is faster, integrates with ...