O'Reilly logo

Creating Mobile Apps with Sencha Touch 2 by Bryan P. Johnson, John Earl Clark

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting started with images

There are a couple of important things to note about using images in an application. The first is that the application must be a compiled application in order for this feature to work. You will also need to add Ext.device.Camera to your requires section in app.js. Since this functionality is only used in compiled applications, the file is not included by default.

Note

Since we have covered compiling applications in Chapter 3, Going Command Line, for our TimeCop application, we will not cover it again here.

For security reasons, JavaScript has no access to the filesystem on a mobile device. Only by compiling the application can we bypass this limitation and use the camera or access existing photos on the device. This means ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required