Camera Example Srn

In this example, you will build a simple full-screen application that will take a picture using the camera. For the iPhone, you will need to test this on a real device as you cannot test taking photos using the simulator. Create a new Titanium Mobile project and replace the contents of app.js with the code shown in Listing 9-2. var tabGroup Titanium.UI.createTabGroup var winMain Titanium.UI.createWindow title 'Camera Example', tabBarHidden true var tabMain Titanium.UI.createTab title '', window...

Camera Example 1

In this section, we will step through writing an application that will allow you to take pictures using the smartphone camera using PhoneGap APIs on iPhone. Create a new PhoneGap iPhone project, using the steps from the previous examples. Name the project pg_camera. The complete source code to the completed application is available online at Replace the generated index.html file in the www directory with the following lt DOCTYPE HTML PUBLIC - W3C DTD HTML 4.01 EN lt html gt lt head gt lt meta...

Development Architecture

Rhodes applications are installed and run as native applications. However, you develop using the web development paradigm. You define the user interface of your application in HTML and CSS. Then, at runtime, the HTML and CSS is rendered in a native browser UI control that is embedded in your application by the Rhodes framework. JavaScript may be used for some interaction control the same way that you would use JavaScript in a web application. You can also add application logic to your views...

BlackBerry Browser UI Controls

Developing for the BlackBerry web UI requires a disciplined approach to work within the limitations of the target browser. There are two separate browser-rendering engines included on the BlackBerry platform browser.field available since v3.8 with most recent changes made in v4.5 The level of content support provided by this browser is limited to Document Object Model DOM L1 read only access to the DOM . Partial support for HTML, JavaScript and CSS. Content rendered using this browser field...

Organizing Data with Lists

Lists are one of the most frequently used components in iPhone applications, as they provide a simple way to layout various types of information, and can optionally provide hierarchical organization to allow for sub-lists and navigation. iWebKit provides several different formatting options for lists in your application. You can choose to style your list using the classic style, with support for images and comments a list in the classic iTunes style, containing album covers, artist, title, and...

Sencha Touch

Sencha Touch www.sencha.com products touch is a JavaScript framework for creating web applications targeted to touch-based devices. Sencha Touch is the flagship product of Sencha formerly Ext JS , a Palo Alto, Calif. company launched in 2007 that makes application frameworks. Sencha Touch combines ExtJS, jQTouch and Rapha l. Unlike jQTouch, Sencha Touch is not dependent on jQuery and is compatible with both the iPhone and Android. Sencha Touch is distributed under the GPL v3 open source...

Simple Application Using BlackBerry Browser Field

You can also display HTML content in your application using the BlackBerry Browser Field. In this example we use BlackBerry OS 5.0 JDE, which supports the later Browser Field version 2. Read about the differences between Browser Field version 1 and version 2 in chapter 14. The code is very similar to the previous example. Instead of creating an instance of RichTextField, we create an instance of the BrowserField class. import import net.rim.device.api.ui.container. public class HelloBrowser...

Query

Whether your web service uses SOAP, JSON, XML, or any other protocol or data format including direct access to a database , Ruby offers a wide assortment of standard and third-party libraries that you can use to easily integrate with any kind of web service or data source. Imagine a simple back-end application where the web services are published as REST interfaces and return JSON. A sample query method to interact with this simple product catalog web service will retrieve all products in a...

Create

In the create method, you can assume that you will receive an object in the form of a hash of name-value pairs. The default name assigned to this argument is create_hash, although since this is just the name of the argument to the method, you can feel free to assign any name to the argument in your implementation. In an inventory-tracking application, the hash returned from the client for a new record might resemble Listing 7-8. Listing 7-8. Create parameter format The create method needs to...

CrossPlatform Frameworks

In the past few years, many cross-platform frameworks have emerged. There has been an explosion of activity in this area as mobile devices become faster and more widely adopted, and particularly with a fast-growing market for applications. This book covers many of the popular frameworks that are focused on application development. The frameworks fall into two categories those that let you create a native mobile application using cross-platform APIs, and HTML CSS Javascript frameworks that let...

Development

iPhone, BlackBerry, Windows Mobile and Android Development and Distribution Sarah Allen Vidal Graupera Lee Lundrigan Pro Smartphone Cross-Platform Development iPhone, BlackBerry, Windows Mobile, and Android Development and Distribution Sarah Allen, Vidal Graupera, Lee Lundrigan Pro Smartphone Cross-Platform Development iPhone, Blackberry, Windows Mobile and Android Development and Distribution Copyright 2010 by Sarah Allen, Vidal Graupera, Lee Lundrigan All rights reserved. No part of this work...