O'Reilly logo

Appcelerator Titanium Smartphone App Development Cookbook - Second Edition by Jason Kneen

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

Gathering information about your device

The majority of information about the current device is available through the Ti.Platform namespace. It is here that we can determine a host of device-specific data, including the battery level, device OS and version, current device language, screen resolution, and more. Knowing this information is important, as it will give you a series of clues about what is happening in the physical device. One example is that you may wish to back up a user's application data if the battery dips below a certain percentage, lest the device shuts down and the data is lost. More commonly, you will use device properties such as Ti.Platform.osname to determine what operating system your app is currently running on, such as ...

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