Unit1 Android
Unit1 Android
UNIT 1:
History of Android
The android history in a sequence:
4) Originally intended for camera but shifted to smart phones later because
of low market for camera only.
Page | 1
Android Programming
Features of Android
Android is a powerful operating system competing with Apple 4GS and supports great
features. Few of them are listed below −
Page | 2
Android Programming
1 Beautiful UI
Android OS basic screen provides a beautiful and intuitive user
interface.
2 Connectivity
GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi, LTE,
NFC and WiMAX.
3 Storage
SQLite, a lightweight relational database, is used for data storage
purposes.
4 Media support
H.263, H.264, MPEG-4 SP, AMR, AMR-WB, AAC, HE-AAC, AAC 5.1,
MP3, MIDI, Ogg Vorbis, WAV, JPEG, PNG, GIF, and BMP.
5 Messaging
SMS and MMS
6 Web browser
Based on the open-source WebKit layout engine, coupled with
Chrome's V8 JavaScript engine supporting HTML5 and CSS3.
7 Multi-touch
Android has native support for multi-touch which was initially
made available in handsets such as the HTC Hero.
8 Multi-tasking
User can jump from one task to another and same time various
applications can run simultaneously.
Page | 3
Android Programming
9 Resizable widgets
Widgets are resizable, so users can expand them to show more
content or shrink them to save space.
10 Multi-Language
Supports single direction and bi-directional text.
11 GCM
Google Cloud Messaging (GCM) is a service that lets developers
send short message data to their users on Android devices,
without needing a proprietary sync solution.
12 Wi-Fi Direct
A technology that lets apps discover and pair directly, over a
high-bandwidth peer-to-peer connection.
13 Android Beam
A popular NFC-based technology that lets users instantly share,
just by touching two NFC-enabled phones together.
General
Messaging
SMS and MMS are available forms of messaging, including
threaded text messaging and Android Cloud To Device Messaging
(C2DM) and now enhanced version of C2DM, Android Google Cloud
Messaging (GCM) is also a part of Android Push Messaging services.
Auto Correction and Dictionary
Android Operating System has an interesting feature called Auto
Correction. When any word is misspelled, then Android recommends
the meaningful and correct words matching the words that are
available in Dictionary. Users can add, edit and remove words from
Dictionary as per their wish[4].
Web browser
Page | 4
Android Programming
Page | 5
Android Programming
TV recording
Android TV supports capturing video and replaying it. [12]
Video calling
Android does not support native video calling, but some handsets
have a customized version of the operating system that supports it,
either via the UMTS network (like the Samsung Galaxy S) or over IP.
Video calling through Google Talk is available in Android 2.3.4
(Gingerbread) and later. Gingerbread allows Nexus S to place
Internet calls with a SIP account. This allows for enhanced VoIP
dialing to other SIP accounts and even phone numbers. Skype 2.1
offers video calling in Android 2.3, including front camera support.
Users with the Google+ Android app can perform video chat with
other Google+ users through Hangouts.
Multiple language support
Android supports multiple languages.[13]
Accessibility
Built-in text-to-speech is provided by TalkBack for people with low
or no vision. Enhancements for people with hearing difficulties are
available, as are other aids.
Connectivity
Connectivity
Android supports connectivity technologies
including GSM/EDGE, Bluetooth, LTE, CDMA, EV-DO, UMTS, NFC, IDE
N and WiMAX.
Bluetooth
Supports voice dialing and sending contacts between phones, playing
music, sending files (OPP), accessing the phone book
(PBAP), A2DP and AVRCP. Keyboard, mouse and joystick (HID)
support is available in Android 3.1+, and in earlier versions through
manufacturer customizations and third-party applications.[14]
Tethering
Page | 6
Android Programming
Media
Streaming media support
RTP/RTSP streaming 3GPP PSS, ISMA), HTML progressive download
(HTML5 <video> tag). Adobe Flash Streaming (RTMP) and HTTP
Dynamic Streaming are supported by the Flash plugin.[16] Apple HTTP
Live Streaming is supported by RealPlayer for Android,[17] and by the
operating system since Android 3.0 (Honeycomb).[18]
Media support
Android supports the following audio/video/still media
formats: WebM, H.263, H.264, AAC, HE-AAC (in 3GP or MP4 containe
r), MPEG-4 SP, AMR, AMR-WB (in 3GP container), MP3, MIDI, Ogg
Vorbis, FLAC, WAV, JPEG, PNG, GIF, BMP, and WebP.[3]
External storage
Most Android devices include microSD card slots and can read
microSD cards formatted with the FAT32, Ext3 or Ext4 file systems.
To allow use of external storage media such as USB flash
drives and USB HDDs, some Android devices are packaged with USB-
OTG cables. Storage formatted with FAT32 is handled by the Linux
Kernel vFAT driver, while 3rd party solutions are required to handle
some other file systems such as NTFS, HFS Plus and exFAT.
Hardware support
Android devices can include still/video
cameras, touchscreens, GPS, accelerometers, gyroscopes, barometers, magn
etometers, dedicated gaming controls, proximity and pressure
sensors, thermometers, accelerated 2D bit blits (with hardware
orientation, scaling, pixel format conversion) and accelerated 3D graphics.
Other
Java support
While most Android applications are written in Java, there is no Java
Virtual Machine in the platform and Java byte code is not executed.
Java classes are compiled into Dalvik executables and run on
Page | 7
Android Programming
Handset layouts
The platform works for various screen sizes from smartphone sizes
and to tablet size, and can potentially connect to an external screen,
e.g. through HDMI, or wirelessly with Miracast. Portrait and
landscape orientations are supported and usually switching between
by turning. A 2D graphics library, 3D graphics library based
on OpenGL ES 2.0 specifications is used.
Storage
SQLite, a lightweight relational database, is used for data storage
purposes.
Native Apps
Android apps are also written in HTML.
Instant Apps
Android apps are hosted on a specific website path and load instead
of the website itself. They are part-apps and load almost instantly
without the need for an installation. One of the first apps being
developed with such functionality is the B&H app.
o Entertainment
o Tools
o Communication
o Productivity
o Personalization
o Music and Audio
o Social
o Media and Video
o Travel and Local etc.
Page | 8
Android Programming
Android - Architecture
Android operating system is a stack of software components which is
roughly divided into five sections and four main layers as shown below in
the architecture diagram.
1. Linux kernel
2. native libraries (middleware),
3. Android Runtime
4. Application Framework
5. Applications
1) Linux kernel
At the bottom of the layers is Linux - Linux 3.6 with approximately 115
patches. This provides a level of abstraction between the device hardware
and it contains all the essential hardware drivers like camera, keypad,
display etc.
Page | 9
Android Programming
2) Native Libraries
On the top of Linux kernel, there are Native libraries such as WebKit,
OpenGL, FreeType, SQLite, Media, C runtime library (libc) etc.
Some key core Android libraries available to the Android developer are as
follows −
android.app − Provides access to the application model and is the
cornerstone of all Android applications.
android.content − Facilitates content access, publishing and
messaging between applications and application components.
android.database − Used to access data published by content
providers and includes SQLite database management classes.
android.opengl − A Java interface to the OpenGL ES 3D graphics
rendering API.
android.os − Provides applications with access to standard
operating system services including messages, system services and
inter-process communication.
android.text − Used to render and manipulate text on a device
display.
android.view − The fundamental building blocks of application user
interfaces.
Page | 10
Android Programming
3) Android Runtime
This is the third section of the architecture and provides a key component
called Dalvik Virtual Machine which is a kind of Java Virtual Machine
specially designed and optimized for Android.
The Dalvik VM makes use of Linux core features like memory management
and multi-threading, which is intrinsic in the Java language.
The Android runtime also provides a set of core libraries which enable
Android application developers to write Android applications using
standard Java programming language.
4) Application Framework
Page | 11
Android Programming
5) Applications
Android Development Tools (ADT) is a plugin for the Eclipse IDE that is
designed to give you a powerful, integrated environment in which to build
Android applications.
ADT extends the capabilities of Eclipse to let you quickly set up new
Android projects, create an application UI, add packages based on the
Android Framework API, debug your applications using the Android SDK
tools, and even export signed (or unsigned) .apk files in order to distribute
your application.
Developing in Eclipse with ADT is highly recommended and is the fastest
way to get started. With the guided project setup it provides, as well as
tools integration, custom XML editors, and debug output pane, ADT gives
you an incredible boost in developing Android applications.
**The Eclipse ADT plugin is no longer supported, as per this announcement in June 2015.
The Eclipse ADT plugin has many known bugs and potential security bugs that will not be fixed.
Page | 12