Mobile Application Development
Mobile Application Development
Abstract:
Mobile application development is the set of processes and procedures involved in writing application
software for small, wireless computing devices such as smart-phones or tablets. These applications are either preinstalled on phones during manufacture, or downloaded by customers from various mobile software distribution
platforms.
Mobile application development is similar to Web application development and has its roots in more traditional
software development. One critical difference, however, is that mobile applications (apps) are often written
specifically to take advantage of the unique features a particular mobile device offers. For instance, a gaming app
might be written to take advantage of the Android's accelerometer.
Android is a software stack for mobile devices that includes an operating system, middleware and key
applications. The Android SDK provides the tools and APIs necessary to begin developing applications on the
Android platform using the Java programming language.
This paper describes how to create Android applications with Eclipse. It is based on Eclipse 3.6 (Helios), Java 1.6
and Android 2.3.3 (Gingerbread).
Introduction:
Android is an open source and free mobile platform built on Linux kernel and backed by the strong consumer
brand of Google. Google announced the formation of the Open Handset Alliance (OHA) in Nov 2007 to further the
development of Android. OHA includes 45 diverse companies (mobile operators, handset manufacturers,
semiconductor companies, commercialization companies, and software companies). Android was open sourced
as a project in Oct 2008.
Services - perform background tasks without providing an UI. They can notify the user via the notification
framework in Android.
Content Provider - provides data to applications, via a content provider your application can share data with
other applications. Android contains a SQLite DB which can serve as data provider
Intents are asynchronous messages which allow the application to request functionality from other services or
activities. An application can call directly a service or activity (explicit intent) or ask the Android system for
registered services and applications for intent (implicit intents).
Broadcast Receiver - receives system messages and implicit intents, can be used to react to changed conditions in
the system. An application can register as a broadcast receiver for certain events and can be started if such an
event occurs.
1.3. AndroidManifest.xml
An Android application is described by the file "AndroidManifest.xml". This file must declare all activities, services,
broadcast receivers and content provider of the application. It must also contain the required permissions for the
application. For example if the application requires network access it must be specified here.
"AndroidManifest.xml" can be thought as the deployment descriptor for an Android application.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="myandroid.hello"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Hello"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
The "package" attribute defines the base package for the following Java elements. It also must be unique as the
Android Marketplace only allows application for a specific package once. Therefore a good habit is to use your
reverse domain name as a package to avoid collisions with other developers.
"android:versionName" and "android:versionCode" specify the version of your application. "versionName" is
what the user sees and can be any string. "versionCode" must be an integer and the Android Market uses this to
determine if you provided a newer version to trigger the update on devices which have your application installed.
You typically start with "1" and increase this value by one if you roll-out a new version of your application.
"activity" defines an activity in this example pointing to the class "de.vogella.android.temperature.Convert". For
this class an intent filter is registered which defines that this activity is started once the application starts (action
android:name="android.intent.action.MAIN").
The
category
definition
(category
android:name="android.intent.category.LAUNCHER" ) defines that this application is added to the application
directory on the Android device. The @ values refer to resource files which contain the actual values. This makes
it easy to provide different resources, e.g. strings, colors, icons, for different devices and makes it easy to
translate applications.
The "uses-sdk" part of the "AndroidManifest.xml" defines the minimal SDK version your application is valid for.
This will prevent your application being installed on devices with older SDK versions.
onSaveInstanceState() - called if the activity is stopped. Used to save data so that the activity can restore its states
if re-started
onPause() - always called if the Activity ends, can be used to release resource or save data
onResume() - called if the Activity is re-started, can be used to initialize fields
The activity will also be restarted if a so called "configuration change" happens. A configuration change for
examples happens if the user changes the orientation of the device (vertical or horizontal). The activity is in this
case restarted to enable the Android platform to load different resources for these configuration, e.g. layouts for
vertical or horizontal mode. In the emulator you can simulate the change of the orientation via CNTR+F11.
1.7. Context
The class android.content.Context provides the connections to the Android system. It is the interface to global
information about the application environment. Context also provides the method which allows to receive
Android services, e.g. the Location Service. As Activities and Services extend the class "Context" you can directly
access the context via "this".
Conclusion:
The Android mobile phone market is growing at an impressive rate of 32 per cent every month, with new
handsets being released all the time. Industry experts believe the boom owes much to the popularity of the
Motorola Droid, MotoBLUR, certain HTC models, and the opensource nature of the OS. As a new wave in the
crowded mobile market, Android Mobile Development is an important aspect in developing mobile applications
using the software stack provided in the Google Android SDK. The use of Androidbased smartphones is booming,
with more than 50,000 and android applications being already developed. Android is java based environment.
Android is proliferating rapidly due to open, fast and easy development of applications. Developers write
managed code in Java language using Android Java libraries. Android is not limited to mobile applications. Android
can be used in consumer electronic devices, net books, automotive units, among other devices. Phones from
Google, Motorola, AT&T, Sprint-Nextel, and Verizon-Wireless run on the Android platform. Broadcom have
ported Android to their advanced navigation processor. MIPS Technologies have ported Android to their 32-bit
version of the MIPS architecture. This architecture is used in set-top boxes, digital TV sets, home media players,
Internet telephony systems and mobile internet devices (MIDs). Intel has demonstrated an Atombased Net book
running Google's Android operating system at Computex. CES 2010 showcased set top boxes and automotive
units which use Android.
References:
Learn Java for Android Development- Jeff Friesen
http://developer.android.com
http://www.wikipedia.org/
http://www.devx.com/wireless/Article/39101/1954?pf=true