After installing iPhone Developer SDK is required to find a Xcode application. Xcode can be found following a disk icon on right up corner of Mac desktop. In Open dialog follow Developer folder then Applications folder and the finally Xcode.
Developer could use Apple Creating an iPhone Application guide as next step to build the first sample project MoveMe. Project code can be downloaded from Apple. “Although iPhone OS has a virtual memory system, but it does not use a swap file. This means that code pages can be flushed as needed but iPhone application’s data must all fit into memory at the same time. The system monitors the overall amount of free memory and does what it can to give iPhone application the memory it needs. If memory usage becomes too critical though, the system may terminate iPhone application.”
The NSObject protocol groups methods (NS stands for NEXTSTEP) are fundamental to all Objective-C objects. In Mac OS X v10.5 and later, developer can use automatic memory management by adopting garbage collection, as it described in Garbage Collection Programming Guide.
A simple Window-Based Application iPhone app could be created in XCode, with next code right after line :
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSObject *obj; // declare variable
obj = [NSObject alloc]; // allocate variable
[obj init]; // initialize variable
NSLog(@”Option 2:%@\n”, obj); // output variable declaration into console
This NSLog output is sent to Console. To test this code goto Run -> Console -> Build and Go.
Key elements in iPhone Application are window and views, event handling cycle, memory management, security and the Info.plist file.
Window and Views – Window provides the background platform for displaying content. Views do work of drawing content and responding to user interactions.
Event handling cycle – infrastructure of the UIApplication object that takes event off the top of queue and delivers it to the responder object, typically to the UIWindow object that represents the application’s main window.
Memory management – each application has its own virtual address space, the same system could be found in Mac OS X.
Application security – sandbox restricts an application (including its preferences and data). It starts during the installation process, the system creates the application’s home directory and several key subdirectories, and configures the application sandbox. Then application and its data reside in a this location that no other application can access.
Info.plist – defines the contents and behavior of application.
Key elements in Android Application are activities, views, intents, content providers, services, and the AndroidManifest.xml file.
View – are building blocks of a user interface, and they know how to draw themselves. This concept carries over to Android from J2EE and Swing.
Activity – usually represents as single screen in Android application. In general it contains one or more views, but there are viewless activity such as “Service”.
Intent – defines an “intention” to do some work. Developer can use intents to perform tasks, as broadcast a message, start a service, launch an activity or display a web page. Intents also could be used by the system to notify application of specific events (such as the arrival of a text message). Intents are loosely couple the action and action handler.
Content Provider – defines a standard mechanism for applications to share data (such as a list of contacts) without exposing the underlying storage, structure, and implementation.
Services – background processes that can potentially run for a long time. Android defines two types of services: local services (accessible by the application that is hosting the service) and remote services (that are meant to be accessed remotely by other applications running on the device). Developer can use existing services and write own services by extending the Service class.
AndroidManifest.xml – defines the contents and behavior of application, it lists application activities and services, along with the permissions.
Each Android application in general runs under its own unique ID, and it is different from desktop environment where most of the applications run under the logged-in user ID. Android OS creates an isolation boundary around each process to prevent one application from directly accessing another application’s data. From the other side it is possible to have a data sharing between applications. For example, process can query a content provider of another application, or invoke an activity in another application. To protect the user from malicious applications, Android requires applications to request permissions if they need to use a protected feature (such as contact data), features (such as the device’s camera) and by default applications cannot access them. At install time, the APK installer either grants or denies the requested permissions based on the signature of the .apk file and/or feedback from the user. If a permission is not granted, any attempt to execute or access the associated feature will result in a permission failure (access denied).
Location functionality makes possible totally new applications. Application can look up restaurants, hotels, taxis and other services. The world of LBS is just starting and Google’s Android offers features that makes the development of these applications easie. To enable this functionality Android application has to hold the apiKey attribute with the Google Maps API Key. This key is required in order to receive the map data, even while application is in development. Developers could register certificate and receive a Maps API Key for free. Application manifest should also request the INTERNET permissions. SDK provides a MapView class allows creating a map-viewing Activity, and ZoomControls widget for zooming in and out.
Before releasing Android application to Google Market is required to sign it. During application development Android SDK is signing binaries all time with debug certificate. But debug signature does not alow to publish application, it should be a new signature.
Google has minimized the hassle of getting applications signed. There are no need to go to a central signing authority like Verisign to get a signing certificate. Developer can generated the certificate by himself, and can sign it using the jarsigner tool that comes with the Java JDK.
That is a good news for developers comparing with other developers toolkits. For example to have access to functions like internet access in Sprint Sumsung Instinct SDK is required to buy Verisign certificate.
Java development with help of BlackBerry JDE Plug-in for Eclipse provides access to the camera, phone and peripheral protocols like Bluetooth®, as well allows integration with the core applications such as address book, GPS, Maps and Message. Developer can use BlackBerry App World store for application distribution. After registering and accepting Vendor Agreement there’s a $200 USD administration fee per each 10 submitted applications. This year BlackBerry made available Developer Challenge 2009 to boost application development. Contest took place from June 1, 2009 to September 25, 2009. Additionally the BlackBerry® Plug-in for Microsoft® Visual Studio® allows developers to create and debug web projects for BlackBerry smartphones. BlackBerry Smartphone Simulators are available for all BlackBerry smartphones from v4.1 to v4.6.
The Android platform lets you record audio and video, where supported by the mobile device hardware. To record audio or video, developers can use the MediaRecorder class. Note that the Android Emulator window doesn’t have hardware to capture audio or video, but actual mobile devices are likely to provide these capabilities, accessible through the MediaRecorder class.
Following latest announcement Google Android got a boost from recently released Ustream application. This application currently works on Android 1.5 “Cupcake” only. Ustream app can broadcast live content to the web over 3G or Wi-Fi, or it can record in offline mode and then upload to the Internet.
British mobile network operator Vodafone has announced new mobile web service Vodafone 360 that includes a cloud-based services, music downloads, app store and integration with social communities such as Facebook and Twitter. First two Vodafone 360 devices will run the LiMo operating system. It looks like fight for developers’ attention has been intensified. Watch this youtube video.