Introduction to Android PDF
Document Details
Uploaded by InsightfulBandoneon
Tags
Summary
This document provides an introduction to Android, a popular mobile operating system. It covers its history and evolution. Key topics include early development, features, and applications, demonstrating a comprehensive overview of the Android platform.
Full Transcript
Introduction to Android What is android? Android is a software package and Linux based operating system for mobile devices such as tablet computers and smart phones released first version in 2007. It is developed by Google and later the OHA (Open Handset Alliance). Android is a complete...
Introduction to Android What is android? Android is a software package and Linux based operating system for mobile devices such as tablet computers and smart phones released first version in 2007. It is developed by Google and later the OHA (Open Handset Alliance). Android is a complete set of software for mobile devices such as tablet computers, notebooks, smart phones, electronic book readers, set-top boxes etc. It contains a linux-based Operating System, middleware and key mobile applications. It can be thought of as a mobile operating system. But it is not limited to mobile only. It is currently used in various devices such as mobiles, tablets, televisions etc. Android 1 Cont… Originally, Android was created by a company called Android Inc. Google acquired this company in 2005. After then, Google made it open-source and Android gained a big momentum. Android has the market share of around 85% in 2016 as shown in Figure 1.1 (data source: http://www.idc.com/). Considering this market share, it is obviously rewarding to invest in Android app development. Android 2 Cont… Figure 1.1. Market shares of mobile operating systems between 2015-Q4 Android and 2016-Q3 3 A brief history of Mobile Mobile devices are no longer simple voice communication devices. They have become a medium to create voice, music, text, video, and image communications. Importantly, these various interactions can be created and shared on demand by the mobile user. In addition to communication methods, mobile devices are also a tool used to access the Internet, view television and movies, interact with GPS (Global Positioning System), play games, and read and respond to barcode and augmented reality messages. The reach and functionality of mobile devices depends on their underlying network infrastructure and the capabilities of the mobile device or handset. Android 4 Cont… A mobile phone is a portable telephone that can make and receive calls over a radio frequency carrier while the user is moving within a telephone service area. The radio frequency link establishes a connection to the switching systems of a mobile phone operator, which provides access to the Public Switched Telephone Network (PSTN). Most modern mobile telephone services use cellular network architecture, and therefore mobile telephones are often also called cellular telephones or cell phones. Android 5 Cont… In addition to telephony, 2000s-era mobile phones support a variety of other services, such as text messaging, MMS, email, Internet access, short-range wireless communications (infrared, Bluetooth), business applications, gaming, and digital photography. Mobile phones which offer these and more general computing capabilities are referred to as smart phones The first handheld mobile phone was demonstrated by John F. Mitchell and Martin Cooper of Motorola in 1973, using a handset weighing c. 4.4 lbs (2 kg). In 1983, the DynaTAC 8000x was the first commercially available handheld mobile phone. Android 6 Mobile Technology Networks and Infrastructure Every mobile phone vendors/proprietary platforms like Android, Apple iPhone OS, RIM Blackberry OS, Bada OS, Symbian OS provide their own SDK (Software Development Kit)to the developer. Developers can create applications using this kit. Developers are also provided a space/place/market where they can publish their creations to the world. Android 7 Cont… Martin Cooper of Motorola made the first publicized handheld mobile phone call on a prototype DynaTAC model on April 4, 1973. A handheld mobile radio telephone service was envisioned in the early stages of radio engineering. In 1917, Finnish inventor Eric Tigerstedt filed a patent for a "pocket-size folding telephone with a very thin carbon microphone". Early predecessors of cellular phones included analog radio communications from ships and trains. The Motorola DynaTAC 8000X. First commercially available handheld cellular mobile phone, 1984. The first handheld mobile cell phone was demonstrated by Motorola in 1973. The first commercial automated cellular network was launched in Japan by Nippon Telegraph and Telephone in 1979. Android 8 Types of mobile phone generations Android 9 The Mobile Ecosystem Android 10 Cont… Android 11 Cont… Android 12 Cont… Android 13 Cont… Android 14 Mobile Apps testing tools Android 15 Cont… Android 16 Types of Mobile Applications Mobile SDK supports building three types of apps: Native apps are specific to a given mobile platform (iOS or Android) using the development tools and language that the respective platform supports (e.g., Xcode and Objective-C with iOS, Eclipse and Java with Android). Native apps look and perform the best. HTML5 apps use standard web technologies—typically HTML5, JavaScript and CSS. This write-once-run-anywhere approach to mobile development creates cross-platform mobile applications that work on multiple devices. While developers can create sophisticated apps with HTML5 and JavaScript alone, some vital limitations remain at the time of this writing, specifically session management, secure offline storage, and access to native device functionality (camera, calendar, geolocation, etc.) Hybrid apps make it possible to embed HTML5 apps inside a thin native container, combining the best (and worst) elements of native and HTML5 apps. Android 17 Cont… Android 18 Native Mobile Applications In a nutshell, native apps provide the best usability, the best features, and the best overall mobile experience. There are some things you only get with native apps: Multi touch - double taps, pinch-spread, and other compound UI gestures Fast graphics API - the native platform gives you the fastest graphics, which may not be a big deal if you’re showing a static screen with only a few elements, or a very big deal if you’re using a lot of data and require a fast refresh. Fluid animation - related to the fast graphics API is the ability to have fluid animation. This is especially important in gaming, highly interactive reporting, or intensely computational algorithms for transforming photos and sounds. Android 19 Cont… Built-in components - The camera, address book, geolocation, and other features native to the device can be seamlessly integrated into mobile apps. Another important built-in components is encrypted storage, but more about that later. Ease of use - The native platform is what people are accustomed to, and so when you add that familiarity with all of the native features they expect, you have an app that’s just plain easier to use. Documentation - There are over 2500 books alone for iOS and Android development, with many more articles, blog posts, and detailed technical threads on sites like Stack Overflow. Android 20 Cont… Android 21 Mobile Information Architecture Mobile devices have their own set of Information Architecture patterns, too. While the structure of a responsive site may follow more “standard” patterns, native apps, for example, often employ navigational structures that are tab-based. Again, there’s no “right “way to architect a mobile site or application. Instead, let’s take a look at some of the most popular patterns: Hierarchy, Hub & spoke, Nested doll, Tabbed view, Bento box and Filtered view: Android 22 Hierarchy The hierarchy pattern is a standard site structure with an index page and a series of sub pages. If you are designing a responsive site you may be restricted to this, however introducing additional patterns could allow you to tailor the experience for mobile. Luke Wroblewski’s Mobile First approach helps us focus on the important stuff first: features and user journeys that will help us create great user experiences. Android 23 Cont… Android 24 Hub & spoke A hub and spoke pattern gives you a central index from which users will navigate out. It’s the default pattern on Apple’s iPhone. Users can’t navigate between spokes but must return to the hub, instead. This has historically been used on desktop where a workflow is restricted (generally due to technical restrictions such as a form or purchasing process) however this is becoming more prevalent within the mobile landscape due to users being focused on one task, as well as the form factor of the device, making a global navigation more difficult to use. Android 25 Cont… Android 26 Nested doll The nested doll pattern leads users in a linear fashion to more detailed content. When users are in difficult conditions this is a quick and easy method of navigation. It also gives the user a strong sense of where they are in the structure of the content due to the perception of moving forward and then back. Android 27 Tabbed view This is a pattern that regular app users will be familiar with. It’s a collection of sections tied together by a toolbar menu. This allows the user to quickly scan and understand the complet functionality of the app when it’s first opened. Android 28 Bento Box/Dashboard The bento box or dashboard pattern brings more detailed content directly to the index screen by using components to display portions of related tools or content. This pattern is more suited to tablet than mobile due to its complexity. It can be really powerful as it allows the user to comprehend key information at a glance, but does heavily rely on having a well-designed interface with information presented clearly. Good for Multi-functional tools and content-based tablet apps that have a similar theme. Android 29 Cont… Android 30 Filtered view Finally, a filtered view pattern allows the user to navigate within a set of data by selecting filter options to create an alternative view. Filtering, as well as using faceted search methods, can be an excellent way to allow users to explore content in a way that suits them. Good for Apps or sites with large quantities of content, such as articles, images and videos. Android 31 Uses of mobile phones Digital camera: Point-and-click! Phones capture pictures and let us save them for posterity or transfer them to others and to computers. Audio recorder: Mobile phones can be used to record conversations or even brief notes to oneself. Video recorder: Phones are becoming video cameras also -- some of the newest cellphones can record an hour or more of video. Multimedia messaging: Everything recorded can be shared with others by using MMS. Email client: The phone can be used to connect to any POP or IMAP server and allow receiving and sending email. While most phones may not have the ease of use that a Blackberry has with email, contacts and calendar, the fact that it is on the phone itself and that there is no need for a separate device can be a big help (along with the lower total cost ofownership). Android 32 Cont… Web client: Phones can also browse websites, via a WAP and/or HTML browser. Most web sites may not look great on the small screen, but it is still possible to connect to any web site. Gaming platform: Mobile games have become big business in the past couple years as people seek entertainment in the free time that they have on the device that they always carry with them. Documents viewer: It is increasingly possible to view documents on the cell phone, in the popular MS-Office file formats. Music player: The next big thing in 2005 is reckoned to be the combining of music capabilities on the mobile phone. While phones can play MP3s, it will soon also be possible to have music streamed from the Internet. Motorola is expected to introduce a phone this year that marries the mobile with Apple's iPod. Android 33 Cont… TV: In India, some operators have been promoting many TV channels on the cell phone over next-generation networks like EDGE. Wallet: The phone can also be used to pay for purchases like a credit or debit card. There is already a billing relationship that exists between the subscriber and the operator, and that can be used to make payments to merchants. Bar-code readers: Phones will also be able to read bar codes and that can have very interesting applications in commerce. Android 34 Cont… Java language is mainly used to write the android code even though other languages can be used. The goal of android project is to create a successful real- world product that improves the mobile experience for end users. There are many code names of android such as Lollipop, Kitkat, Jelly Bean, Ice cream Sandwich, Froyo, Ecliar, Donut etc which is covered in next page. Android 35 Features of Android After learning what is android, let's see the features of android. The important features of android are given below: 1) It is open-source. 2) Anyone can customize the Android Platform. 3) There are a lot of mobile applications that can be chosen by the consumer. 4) It provides many interesting features like weather details, opening screen, live RSS (Really Simple Syndication) feeds etc. It provides support for messaging services(SMS and MMS), web browser, storage (SQLite), connectivity (GSM, CDMA, Blue Tooth, Wi-Fi etc.), media, handset layout etc. Android is a powerful operating system competing with Apple 4GS and supports great features. Android 36 Cont… Android 37 Cont… Android 38 Android Applications Android applications are usually developed in the Java language using the Android Software Development Kit. Once developed, Android applications can be packaged easily and sold out either through a store such as Google Play, SlideME, Opera Mobile Store, Mobango, F-droid and the Amazon Appstore. Android powers hundreds of millions of mobile devices in more than 190 countries around the world. It's the largest installed base of any mobile platform and growing fast. Every day more than 1 million new Android devices are activated worldwide. Android 39 Categories of Android applications There are many android applications in the market. The top categories are: Entertainment Tools Communication Productivity Personalization Music and AudioSocial Media and Video Travel and Local etc. Android 40 Versions of Android The code names of android ranges from A to L currently, such as Aestro, Blender, Cupcake, Donut, Eclair, Froyo, Gingerbread, Honeycomb, Ice Cream Sandwitch, Jelly Bean, KitKat and Lollipop. Let's understand the android history in a sequence. Android 41 Cont… Android 42 What is API (Application Programming Interface) level? API Level is an integer value that uniquely identifies the framework API revision offered by a version of the Android platform. Android 43 Cont… Android 44 Android IDEs There are so many sophisticated Technologies are available to develop android applications, the familiar technologies, which are predominantly using tools as follows Android Studio Eclipse IDE Android 45 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 Android 46 Cont… Android 47 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. Also, the kernel handles all the things that Linux is really good at such as networking and a vast array of device drivers, which take the pain out of interfacing to peripheral hardware. Android 48 Libraries On top of Linux kernel there is a set of libraries including open-source Web browser engine WebKit, well known library libc, SQLite database which is a useful repository for storage and sharing of application data, libraries to play and record audio and video, SSL libraries responsible for Internet security etc. Android 49 Android Libraries This category encompasses those Java-based libraries that are specific to Android development. Examples of libraries in this category include the application framework libraries in addition to those that facilitate user interface building, graphics drawing and database access. A summary of some key core Android libraries available to the Android developer is as follows − Android 50 Cont… 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 51 Cont… android.text − Used to render and manipulate text on a device display. android.view − The fundamental building blocks of application user interfaces. android.widget − A rich collection of pre-built user interface components such as buttons, labels, list views, layout managers, radio buttons etc. android.webkit − A set of classes intended to allow web-browsing capabilities to be built into applications. Having covered the Java-based core libraries in the Android runtime, it is now time to turn our attention to the C/C++ based libraries contained in this layer of the Android software stack Android 52 Android Runtime This is the third section of the architecture and available on the second layer from the bottom. This section provides a key component called Dalvik Virtual Machine (DVM) which is a kind of Java Virtual Machine specially designed and optimized for Android. Android 53 Cont… The Dalvik VM makes use of Linux core features like memory management and multi-threading, which is intrinsic in the Java language. The Dalvik VM enables every Android application to run in its own process, with its own instance of the Dalvik virtual machine. The Android runtime also provides a set of core libraries which enable Android application developers to write Android applications using standard Java programming Android 54 language. Application Framework The Application Framework layer provides many higher- level services to applications in the form of Java classes. Application developers are allowed to make use of these services in their applications. The Android framework includes the following key services Android 55 Cont… Activity Manager − Controls all aspects of the application lifecycle and activity stack. Content Providers − Allows applications to publish and share data with other applications. Resource Manager − Provides access to non-code embedded resources such as strings, color settings and user interface layouts. Notifications Manager − Allows applications to display alerts and notifications to the user. View System − An extensible set of views used to create application user interfaces. Android 56 Applications You will find all the Android application at the top layer. You will write your application to be installed on this layer only. Examples of such applications are Contacts Books, Browser, Games etc. Android 57 Dalvik Virtual Machine | DVM As we know the modern JVM is high performance and provides excellent memory management. But it needs to be optimized for low-powered handheld devices as well. The Dalvik Virtual Machine (DVM) is an android virtual machine optimized for mobile devices. It optimizes the virtual machine for memory, battery life and performance. Dalvik is a name of a town in Iceland. The Dalvik VM was written by Dan Bornstein. The Dex compiler converts the class files into the.dex file that run on the Dalvik VM. Multiple class files are converted into one dex file. Android 58 Cont… Let's see the compiling and packaging process from the source file: Android 59 Cont… The javac tool compiles the java source file into the class file. The dx tool takes all the class files of your application and generates a single.dex file. It is a platform-specific tool. The Android Assets Packaging Tool (aapt) handles the packaging process. Android 60 Thank you!! End of Chapter 1! Android 61