1 / 58

Android

Android. Sujoy Saha , Nitin Agarwal Dept of Computer Applications , NIT Durgapur. Introduction. Android is an operating system based on the Linux kernel designed primarily for touchscreen mobile devices such as smartphones and tablet computers. . History.

vashon
Download Presentation

Android

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Android SujoySaha , NitinAgarwal Dept of Computer Applications , NIT Durgapur

  2. Introduction Android is an operating system • based on the Linux kernel • designed primarily for touchscreenmobile devices such as smartphones and tablet computers.

  3. History Initially developed by Android, Inc., which Google backed financially and later bought in 2005, • To develop, in Rubin's words "smarter mobile devices that are more aware of its owner's location and preferences". • Google acquired Android Inc. on August 17, 2005, making it a wholly owned subsidiary of Google. • Key employees of Android Inc., including Rubin, Miner and White, stayed at the company after the acquisition.

  4. History • At Google, the team led by Rubin developed a mobile device platform powered by the Linux kernel. • Android was unveiled in 2007 along with the founding of the Open Handset Alliance • The first Android phone (HTC Dream) was sold in October 2008.

  5. Open Handset Alliance • The OHA was established on 6 November 2007, led by Google with 34 members including mobile handset makers, application developers, some mobile carriers and chip makers. • Android, the flagship software of the alliance, is based on an open source license • OHA members are contractually forbidden from producing devices that are based off incompatible forks of Android

  6. Licensing • The source code for Android is available under free and open-source software licenses. • The Open Handset Alliance develops the changes to the Linux kernel, in public, with source code publicly available at all times. • The rest of Android is developed in private by Google, with source code released publicly when a new version is released.

  7. Licensing • Google collaborates with a hardware manufacturer to produce a "flagship" device (part of the Nexus series) • It features the new version of Android, then makes the source code available after that device has been released. • Google licenses a suite of proprietary apps for Android, such as Play Store, Google Search, and Google Play Services

  8. Features • Multi-touch • Multitasking • Screen capture • Video calling

  9. Features • Messaging SMS and MMS • Web browser • Voice based features • Multiple language support • Built in text to speech

  10. Connectivity • Android supports connectivity technologies including • GSM/EDGE, • Wi-Fi • Bluetooth, • LTE, CDMA, EV-DO, UMTS, NFC, IDEN and WiMAX. • Bluetooth Supports • voice dialing and sending contacts between phones, sending files (OPP), • accessing the phone book (PBAP), A2DP and AVRCP. • Tethering Android supports tethering, which allows a phone to be used as a wireless/wired Wi-Fi hotspot.

  11. Media • Streaming media support : • RTP/RTSP streaming (3GPP PSS, ISMA), • HTML progressive download (HTML5 <video> tag). • Adobe Flash Streaming (RTMP) • HTTP Dynamic Streaming are supported by the Flash plugin. • Media support :Android supports the following audio/video/still media formats: • WebM H.263, H.264, AAC, HE-AAC (in 3GP or MP4 container), • MPEG-4 SP, AMR, AMR-WB (in 3GP container) • MP3, MIDI, OggVorbis, FLAC, WAV, JPEG, PNG, GIF, BMP, WebP. • External storage : • Most Android devices include microSD slot and can read microSD cards formatted with FAT32, Ext3 or Ext4 file system. • To allow use of high-capacity storage media such as USB flash drives and USB HDD

  12. Hardware support Android devices can include • still/video cameras, • touchscreens, GPS, • accelerometers, gyroscopes, barometers, magnetometers • dedicated gaming controls, proximity and pressure sensors, thermometers, • accelerated 3D graphics.

  13. Other • Java support : • While most Android applications are written in Java • Java classes are compiled into Dalvik executables and run on Dalvik, • Dalvik, a specialized virtual machine designed specifically for Android and optimized for battery-powered mobile devices with limited memory . • Storage SQLite, a lightweight relational database, is used for data storage purposes.

  14. Android Architecture

  15. Kernel Layer At the bottom of the Android stack is the Linux Kernel. It never really interacts with the users and developers, but is at the heart of the whole system. • Hardware Abstraction • Memory Management Programs • Security Settings • Power Management Software • Other Hardware Drivers (Drivers are programs that control hardware devices.) • Support for Shared Libraries • Network Stack

  16. Here is a Table highlighting the different Kernel versions.

  17. Native Libraries Layer The next layer in the Android architecture includes Android’s native libraries. Libraries carry a set of instructions to guide the device in handling different types of data. For instance, the playback and recording of various audio and video formats is guided by the Media Framework Library. • Open Source Libraries: • Surface Manager: composing windows on the screen • SGL: 2D Graphics • Open GL|ES: 3D Library • Media Framework: Supports playbacks and recording of various audio, video and picture formats. • Free Type: Font Rendering • WebKit: Browser Engine • libc (System C libraries) • SQLite • Open SSL

  18. Android Runtime The Android runtime layer includes a set of core Java libraries as well. Android application programmers build their apps using the Java programming language. It also includes the Dalvik Virtual Machine.

  19. Dalvik Virtual Machine Dalvik is open-source software. Dan Bornstein originally wrote Dalvic VM which is responsible for running apps on Android devices. • It is a Register based Virtual Machine. • It is optimized for low memory requirements. • It has been designed to allow multiple VM instances to run at once. • Relies on the underlying OS for process isolation, memory management and threading support. • Operates on DEX files.

  20. Application Framework Layer • The applications directly interact with these blocks of the Android architecture. • Important blocks of Application Framework: • Activity Manager: Manages the activity life cycle of applications. • Content Providers: Manage the data sharing between applications. Telephony Manager: Manages all voice calls. We use telephony manager if we want to access voice calls in our application. • Location Manager: Location management, using GPS or cell tower • Resource Manager: Manage the various types of resources we use in our Application

  21. Application Layer The applications are at the topmost layer of the Android stack. An average user of the Android device would mostly interact with this layer (for basic functions, such as making phone calls, accessing the Web browser etc.). The layers further down are accessed mostly by developers, programmers and the likes. Several standard applications come installed with every device, such as: • SMS client app • Dialer • Web browser • Contact manager

  22. Android Software version history • The first commercial version, Android 1.0, was released in September 2008. • Android is under ongoing development by Google and the Open Handset Alliance (OHA), and has seen a number of updates to its base operating system since its initial release. Since April 2009, Android versions have been developed under a codename and released according to alphabetical order: • Cupcake (1.5) • Donut (1.6) • Eclair (2.0–2.1) • Froyo (2.2–2.2.3) • Gingerbread (2.3–2.3.7) • Honeycomb (3.0–3.2.6) • Ice Cream Sandwich (4.0–4.0.4) • Jelly Bean (4.1–4.3) • KitKat (4.4)

  23. Hardware • The main hardware platform for Android is the 32-bit ARMv7 architecture. There is support for x86 from the Android-x86 project,and • Google TV uses a special x86 version of Android. In 2013, Freescale announced Android on its i.MX processor, i.MX5X and i.MX6X series. • As of November 2013, current versions of Android require at least 512 MB of RAM, and a 32-bit ARMv7, MIPS or x86 architecture processor, together with an OpenGL ES 2.0 compatible graphics processing unit (GPU). • Android supports OpenGL ES 1.1, 2.0 and 3.0. Some applications explicitly require certain version of the OpenGL ES, thus suitable GPU hardware is required to run such applications.

  24. Why Android is killing Apple?

  25. Reach and Cost • The operating system is simply available to a larger number of people • Apple is maintaining a strong market share in some of the world’s top economies, the US, Japan, Europe, etc • Android, on the other hand, has a range of manufacturers producing a range of products

  26. Competition & Innovation • The battle is not just between Google and Apple • Galaxy S4: exercise tracking software, better multitasking functionality, and additional camera settings • HTC, on the other hand, has invested heavily in its BoomSound system, Sense 5, and BlinkFeed.

  27. Open Source ,Free market System • Nvidia Shield is an excellent example of a company utilizing Android in a fairly unique way • Android USB Sticks-PC TV

  28. Strong Developer Community • ROMs like CyanogenMod have proven hugely popular because of their punctual updates for handsets • The custom MIUI ROM, which has proven so popular that handsets pre-installed with the ROM sold out almost as soon as they were announced. • Exynos processor root exploit which was plaguing various Samsung Galaxy handsets a few months back. • The problem was initially addressed and patched by members of the development community well before Samsung put out their own updates

  29. Google Ethos • Google has created a range of free applications which improve the users experience over the default operating system • Google Glass is a prime example of an idea, willingness to Expirement.

  30. Android attracts innovation from both hardware and software developers, which, in my opinion, is the main reason why our favourite mobile operating system is killing Apple.

  31. Android, the world's most popular mobile platform

  32. 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 another million users power up their Android devices for the first time and start looking for apps, games, and other digital content.

  33. Android apps have become invasive.

  34. Development Environment Setup. • Download the Android SDK. • Install the ADT plug-in for Eclipse (if you’ll use the Eclipse IDE). • Download the latest SDK tools and platforms using the SDK Manager.

  35. The Android SDK provides the API libraries and developer tools necessary to build, test, and debug apps for Android. • For a new Android developer, • download the ADT Bundle to quickly start developing apps. It includes the essential Android SDK components and a version of the Eclipse IDE with built-in ADT (Android Developer Tools).

  36. With a single download, the ADT Bundle includes everything you need to begin developing apps: • Eclipse + ADT plugin • Android SDK Tools • Android Platform-tools • The latest Android platform • The latest Android system image for the emulator

  37. ADT Bundle • http://dl.google.com/android/adt/adt-bundle-windows-x86-20131030.zip SDK Tools Only • http://dl.google.com/android/android-sdk_r22.3-windows.zip

  38. Creating an Android Project An Android project contains all the files that comprise the source code for your Android app. The Android SDK tools make it easy to start a new Android project with a set of default project directories and files.

  39. Creating an Android App

  40. Running Android App • AndroidManifest.xml The manifest file describes the fundamental characteristics of the app and defines each of its components. • One of the most important elements manifest should include is the <uses-sdk> element. This declares our app's compatibility with different Android versions using the android:minSdkVersion and android:targetSdkVersion attributes. For our first app, it should look like this: <manifest xmlns:android="http://schemas.android.com/apk/res/android" ... >    <uses-sdkandroid:minSdkVersion="8" android:targetSdkVersion="17" />    ...</manifest>

  41. Running Android App • src/ : Directory for your app's main source files. • res/: Contains several sub-directories for app resources. Here are just a few: • drawable-hdpi/ : Directory for drawable objects (such as bitmaps) that are designed for high-density (hdpi) screens. • layout/ : Directory for files that define your app's user interface. • values/ : Directory for other various XML files that contain a collection of resources, such as string and color definitions.

  42. Building a Simple User Interface • The graphical user interface for an Android app is built using a hierarchy of View and ViewGroup objects. • View objects are usually UI widgets such as buttons or text fields and ViewGroup objects are invisible view containers that define how the child views are laid out, such as in a grid or a vertical list. • Android provides an XML vocabulary that corresponds to the subclasses of View and ViewGroup so you can define your UI in XML using a hierarchy of UI elements.

  43. Illustration of how ViewGroup objects form branches in the layout and contain other View objects.

  44. Format of activity_main.xml file from the res/layout/ directory. In Eclipse, when we open a layout file, we’re first shown the Graphical Layout editor. This is an editor that helps us build layouts using WYSIWYG tools. <?xml version="1.0" encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="horizontal" ></LinearLayout>

  45. Linear Layout • LinearLayout is a view group (a subclass of ViewGroup) that lays out child views in either a vertical or horizontal orientation, as specified by the android:orientation attribute. Each child of a LinearLayout appears on the screen in the order in which it appears in the XML. • The other two attributes, android:layout_width and android:layout_height, are required for all views in order to specify their size. • Because the LinearLayout is the root view in the layout, it should fill the entire screen area that's available to the app by setting the width and height to "match_parent".

  46. Android Application Components The components are loosely coupled by the application manifest file AndroidManifest.xml that describes each component of the application and how they interact.There are following four main components that can be used within an Android application:

  47. Activities • An activity represents a single screen with a user interface. • For example, an email application might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails. • if an application has more than one activity, then one of them should be marked as the activity that is presented when the application is launched. • An activity is implemented as a subclass of Activity class as follows: public class MainActivity extends Activity { }

  48. Starting an Activity • Unlike other programming paradigms in which apps are launched with a main() method, the Android system initiates code in an Activity instance by invoking specific callback methods that correspond to specific stages of its lifecycle. • There is a sequence of callback methods that start up an activity and a sequence of callback methods that tear down an activity.

More Related