Book Image

Xamarin Mobile Application Development for Android, Second Edition

Book Image

Xamarin Mobile Application Development for Android, Second Edition

Overview of this book

Table of Contents (18 chapters)
Xamarin Mobile Application Development for Android Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The Android platform


The Android platform has been one of the most powerful, evolving, and advanced mobile operating systems developed in recent years, which provides various services and features, that helps developers to build rich mobile applications. Android is an open source operating system currently developed and maintained by Google. Due to its open source nature, it has a larger community base of developers and device manufacturers.

The Android operating system was primarily designed for low powered computing phones, but later, its base was widen to various form factors, including smartphones, tablets, Android TV, and Wearables.

Versions of Android

The Android operating system has evolved with a series of frequent updates since its initial beta release in November 2007. Identifying the version of the Android platform can be somewhat confusing; there is a version number, API level, and nickname, and these are sometimes used interchangeably.

The version number represents a release of the platform. Sometimes, a new release is created to deliver new capabilities, while sometimes it is created to fix bugs.

The API level is an integer value that represents a set of capabilities. As the API level increases, new capabilities are delivered to the developer.

The following table lists all the major Android platform releases in the reverse chronological order:

Platform version

API level

Release date

Feature updates

5.1 (Lollipop)

22

03/09/2015

  • Stability and performance improvements over Lollipop.

  • Adds multiple SIM card support.

5.0 (Lollipop)

21

11/12/2014

  • Introduced new runtime ART that replaced Dalvik.

  • A complete UI overhaul with an introduction to material design.

  • Improved lock screen notification.

  • Updated the media API for better camera capture and media playback.

  • Added the project Volta to increase the battery life.

4.4W, 4.4W.1, 4.4W.2 (KitKat Wearables)

20

06/25/2014

  • Initial release for the Android Wear platform's smart watches.

  • Fork of same Android 4.4 KitKat code branch with added wearable extensions.

4.4.x (KitKat)

19

10/31/2013

  • The default interface is made white instead of blue.

  • Added wireless printing capability.

  • Support for translucent navigation and status bars.

  • Ability for apps to use immersive mode to allow navigation and status bars hidden while maintaining user interaction.

  • Action overflow menu buttons are always visible, even for the devices with the hardware Menu key.

  • New framework (property animation) for UI transitions.

  • Built-in screen recording feature.

  • Introduced Android Runtime (ART) as a new experimental runtime environment.

  • Other security enhancements and bug fixes.

4.3.x (Jelly Bean)

18

07/24/2013

  • Supports restricted access mode for new user profiles.

  • Introduced a platform support for Khronos OpenGL ES 3.0, providing better performance for 2D and 3D graphics rendering.

  • Bluetooth low energy support.

  • Optimized location and sensor capabilities, including hardware geo fencing optimizations.

  • Many security enhancements, performance enhancements, and bug fixes.

4.2, 4.2.2 (Jelly Bean)

17

11/13/2012

  • Improved the hardware-accelerated 2D renderer to make the animation smoother.

  • Introduced the interactive screensaver mode called Daydream.

  • Adds a presentation window and external display support.

  • Full native support for right-to-left (RTL) layouts.

  • Numerous bug fixes.

4.1, 4.1.x (Jelly Bean)

16

07/09/2012

  • Faster and smoother interface.

  • Bi-directional text and other language support.

  • Introduced expandable notification.

  • Added the new activity launcher animation via ActivityOptions.

  • Improved WebView to provide better HTML5 video viewing and canvas animation.

4.0.3, 4.0.4 (Ice Cream Sandwich)

15

12/16/2011

  • Bug fixes and stability improvements.

  • New APIs, including a social stream API in the Contacts provider.

  • Better camera performance.

  • Smoother screen rotation.

4.0, 4.0.1, 4.0.2 (Ice Cream Sandwich)

14

10/19/2011

  • Major interface overhaul with the new Roboto font family.

  • Unified the UI framework to work for phones, tablets, and more.

  • Lock screen improvements with the ability to access apps from lock screen.

  • Introduced the new voice input engine.

  • Improved media streaming capabilities.

  • Ability to shut down applications from the recent apps list with a swipe.

  • Hardware acceleration of the UI.

3.2.x (Honeycomb)

13

07/15/2011

  • Optimizations for a wider range of tablets.

  • Added a system-wide sync facility that made the SD card files accessible to apps from the system media store.

  • Bug fixes and other minor improvements.

3.1 (Honeycomb)

12

05/10/2011

  • Connectivity API for USB accessories.

  • Various UI framework updates.

  • Resizable home screen app widgets.

  • Support for an HTTP proxy for each connected Wi-Fi access point.

  • High-performance Wi-Fi lock, maintaining high-performance Wi-Fi connections when the device's screen is off.

  • Updated the animation framework class with ViewPropertyAnimator and animating background color.

3.0 (Honeycomb)

11

02/22/2011

  • Added a new user interface, which optimized tablets.

  • Introduced an action bar, giving access to contextual quick actions at the top of the screen.

  • Added the fragment, a self-contained container that can be embedded in an activity. It has its own life cycle callback and is used to design tablets.

  • Added the system-wide clipboard.

  • Improved the status bar notification to support more content-rich notifications.

  • Added new animation frameworks.

2.3.3, 2.3.7 (Gingerbread)

10

02/02/2011

  • Improvements and bug fixes.

2.3, 2.3.1, 2.3.2 (Gingerbread)

9

12/06/2010

  • Updated the user interface design for simplicity and speed.

  • Added support for Near Field Communication (NFC).

  • Support for extra-large screen sizes and resolutions.

  • Native support for more sensors, including gyroscopes and barometers.

  • Introduced the concurrent garbage collection for improved app responsiveness and smoother animation.

2.2.x (Froyo)

8

05/20/2010

  • Improved speed, memory, and performance optimizations.

  • Improved application speed using the JIT compilation.

  • Support for the Android Cloud to Device Messaging (C2DM) service.

  • Support for installing applications to the SD card memory.

  • USB tethering and Wi-Fi hotspot functionality.

  • Bug fixes and security patch updates.

2.1 (Eclair)

7

01/12/2010

  • Minor API changes and bug fixes.

2.0.1 (Eclair)

6

12/03/2009

  • Minor API changes and bug fixes.

2.0 (Donut)

5

10/26/2009

  • Updated camera features, including flash, digital zoom, white balance, color effect, and scene mode.

  • Optimized hardware speed and UI overhaul.

  • The MotionEvent class enhanced to track multi-touch events.

  • Expanded account sync, allowing users to add multiple accounts to a device.

1.6 (Donut)

4

09/15/2009

  • Multilingual speech synthesis engine added to convert a text to speech.

  • Updated support for CDMA/EVDO, 802.1x, VPNs technologies.

1.5 (Cupcake)

3

04/27/2009

  • Added third-party keyboard support with text prediction and user dictionary.

  • Video recording and playback in MPEG-4 and 3GP formats.

  • Added copy and paste features in the web browser.

  • Animated screen transitions.

  • Home screen widget support.

1.1

2

02/09/2009

  • First Android platform update.

  • Updated the Map application.

  • In-call screen timeout default is now longer when using the speakerphone.

  • Adds support for saving attachments from MMS.

  • Adds support for marquee in layouts.

  • Various bug fixes.

1.0

1

09/23/2008

  • First commercial version of the Android platform.

  • Included apps such as Android Market, Gmail, Camera, Calendar, Contacts, Google Talk, Map, Media Player, Picture, Settings, and Browser.

  • Wi-Fi and Bluetooth support.

  • Instant messaging, text messaging, and MMS support.

The Android platform is comprised of applications, operating systems, runtime, middleware, services, and libraries. The following diagram provides a high-level view of how each layer in the Android platform is organized, and the subsequent sections provide a brief description of each major component:

The Linux kernel

Android is a Linux-based operating system designed and customized primarily for mobile devices, such as smartphones and tablets. Positioned at the bottom of the Android stack, the Linux kernel provides the interface between device hardware and Android software layers. The latest versions of Android are based on the Linux kernel version 3.4 or above (version 2.6 for versions prior to Android 4.0).

The Linux kernel provides some of the core system services such as memory management, process and task management, power management, networking stack, and various device drivers to interact with the device hardware.

Native libraries

Android is delivered with a set of native libraries written in C/C++, which provide various types of services. These libraries predominantly come from the open source community.

The Android runtime

The Android apps run within the Dalvik Virtual Machine (Dalvik VM), which is similar to a Java VM but has been optimized for devices with limited memory and processing capacity.

The Android apps are initially compiled to the Java byte code using the Java compiler, but they have an additional compilation step that transforms the Java byte code to the Dalvik byte code using a process called the Just in Time (JIT) compilation. The output produced by the JIT compiler is suitable to run within the Dalvik VM:

Dalvik is delivered with the Android core libraries. These libraries do not align with a specific Java platform (JSE, JEE, or JME) but rather act as a hybrid platform most closely aligned with JSE, minus the user interface-focused components, AWT and Swing. The Android Application Framework (AAF) provides an alternate means of creating user interfaces.

Although Dalvik worked pretty well, the downside is that there is a huge lag every time the application is launched. That's where the new virtual machine, ART, comes in.

ART is precursor to Dalvik. It is the new application runtime introduced in Android 4.4 (KitKat) as a new experimental runtime environment and is implemented fully in Android 5.0 (Lollipop). This is primarily designed for performance and an improved app start up time. The primary difference between ART and Dalvik is the compilation approach. While Dalvik uses JIT, ART employs a new concept called Ahead-of-Time (AOT). What this means is that new apps are getting compiled during installation, before they are even launched. To learn more about ART, you can refer to https://source.android.com/devices/tech/dalvik/.