By Vishwesh Jirgale Persistent Systems Ltd. Manager – Pune Google Technology Users Group
What’s so special about Android ?
How Android is different to other Platforms including Windows Mobile, Symbian/S60/UIQ, and proprietary (Nucleus, EMP, BREW, etc):
Java as programming language, and not restricting to Java ME, so giving a broader set of libraries for developers. Much like SavaJe (now Sun’s Java FX Mobile), Android is a Java SE -like platform built on a Linux kernel, but more importantly one where the Java platform is deeply integrated with the underlying Linux support package
Funny thing - Google doesn’t claim that Android is a Java platform, although it can run some programs written with the Java language and against some derived version of the Java class library. Because they use Dalvik , a ‘proprietary’ (non-Sun-endorsed) Java virtual machine which means that Android developers can use Java SE APIs, while Google does not have to pay any royalties to Sun for TCK certification
The declarative XML UI framework enables developers and handset manufacturers to rapidly develop the user interface for new applications.
The Android SDK is an environment for building connected applications. Every application (including dialler, idle screen, SMS, contacts, etc) can consume and produce content. Every application on Android is a Web 2.0 citizen .
The Android source code will be licensed under the Apache 2.0 license , a non-copyleft license which allows handset manufacturers to modify the source code without being forced to share back their modifications .
Aah… You are a developer first !!! A developer's perspective on Google's Android
What Is Android?
Android is a complete software stack for mobile devices such as cell phones, PDAs and high end MP3 players. The software stack is split into four layers :
The application layer
The application framework
The libraries and runtime
Cell phone users obviously work with applications in the application layer. Android developers write those applications using the application framework.
Interesting - Unlike many embedded operating environments, Android applications are all equal -- that is, the applications that come with the phone are no different than those that any developer writes.
Android will ship with a set of core applications including an email client, SMS program, calendar, maps, browser, contacts, and others. All applications are written using the Java programming language.
Developers have full access to the same framework APIs used by the core applications. The application architecture is designed to simplify the reuse of components; any application can publish its capabilities and any other application may then make use of those capabilities (subject to security constraints enforced by the framework). This same mechanism allows components to be replaced by the user.
Android includes a set of C/C++ libraries used by various components of the Android system. These capabilities are exposed to developers through the Android application framework.
Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language.
Android relies on Linux version 2.6 for core system services such as security, memory management, process management, network stack, and driver model. The kernel also acts as an abstraction layer between the hardware and the rest of the software stack.
Dalvik virtual machine optimized for mobile devices
Integrated browser based on the open source WebKit engine
Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)
SQLite for structured data storage
Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
GSM Telephony (hardware dependent)
Bluetooth, EDGE, 3G, and WiFi (hardware dependent)
Camera, GPS, compass, and accelerometer (hardware dependent)
Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE
For developers – What all I need ?
Supported Operating Systems
Windows XP or Vista
Mac OS X 10.4.8 or later (x86 only)
Linux (tested on Linux Ubuntu Dapper Drake)
Other than Android SDK you will need -
Eclipse 3.2, 3.3 (Europa)
Eclipse JDT plugin (included in most Eclipse IDE packages)
WST (optional, included in most Eclipse IDE packages )
JDK 5 or JDK 6 (JRE alone is not sufficient)
Not compatible with Gnu Compiler for Java (gcj)
Android Development Tools plugin (optional)
What's inside SDK ?
What's inside SDK ?
android.jar - The Android application framework. Unzipping this jar reveals the entire class structure and all of the supporting classes of the framework. Currently there is no source.
docs - 100 megabytes worth of documentation, samples, etc.
samples - Six different sample applications - ApiDemos, HelloActivity, LunarLander, NotePad, SkeletonApp and Snake
tools - the various SDK binaries such as aapt, acp, and emulator live here.
lib - various templates and supporting jar files live in this directory
activityCreator - the activityCreator python application lives here.
images - The Linux file system images are found in this directory: ramdis.img, system.img and userdata.img. They are YAFFS2 file system images.
skins - supporting emulator graphics for HVGA and QVGA screens in both landscape and portrait format.
Write My First Android App – How about “Hello Android”
Ok show me -
Application Building Blocks
The AndroidManifest.xml file is the control file that tells the system what to do with all the top-level components (specifically activities, services, intent receivers, and content providers described below) you've created. For instance, this is the "glue" that actually specifies which Intents your Activities receive.
An Activity is, fundamentally, an object that has a life cycle. An Activity is a chunk of code that does some work; if necessary, that work can include displaying a UI to the user. It doesn't have to, though - some Activities never display UIs. Typically, you'll designate one of your application's Activities as the entry point to your application.
A View is an object that knows how to draw itself to the screen. Android user interfaces are comprised of trees of Views. If you want to perform some custom graphical technique (as you might if you're writing a game, or building some unusual new user interface widget) then you'd create a View.
An Intent is a simple message object that represents an "intention" to do something. For example, if your application wants to display a web page, it expresses its "Intent" to view the URI by creating an Intent instance and handing it off to the system. The system locates some other piece of code (in this case, the Browser) that knows how to handle that Intent, and runs it. Intents can also be used to broadcast interesting events (such as a notification) system-wide.
Application Building Blocks
A Service is a body of code that runs in the background. It can run in its own process, or in the context of another application's process, depending on its needs. Other components "bind" to a Service and invoke methods on it via remote procedure calls. An example of a Service is a media player; even when the user quits the media-selection UI, she probably still intends for her music to keep playing. A Service keeps the music going even when the UI has completed.
A Notification is a small icon that appears in the status bar. Users can interact with this icon to receive information. The most well-known notifications are SMS messages, call history, and voicemail, but applications can create their own. Notifications are the strongly-preferred mechanism for alerting the user of something that needs their attention.
A ContentProvider is a data storehouse that provides access to data on the device; the classic example is the ContentProvider that's used to access the user's list of contacts. Your application can access data that other applications have exposed via a ContentProvider, and you can also define your own ContentProviders to expose data of your own.
Applications already available
SD Card emulators
Remote Camera Streaming
Android Weather Forceaster which uses Google Weather API
XML RPC Client for Android
Android Dictionary (Eng <-> Chinese)
References and further reading
Multiple blog sites
Test Driven Development and GUI Testing on the Android platform: http://dtmilano.blogspot.com/2008/01/test-driven-development-and-gui-testing.html
Texas Instrument demonstrated its Android Mobile platform at Mobile World Congress in Barcelona. Its on TI’s OMAP 850 processor
It has WiFi, Bluetooth wireless, Web Browsing, send emails, check your gmail account and of course make and receive calls.
Some Pics -
Thank You Questions? You can reach me at- [email_address]