Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android Overview Session

Android Overview Session

Gave an Android Overview session at my firm Nuance Communications during one knowledge sharing session.

Gaurav Bhatnagar

August 07, 2015
Tweet

More Decks by Gaurav Bhatnagar

Other Decks in Technology

Transcript

  1.  Screens are of various sizes.  CPU speed and

    memory are limited compared with what are available on desktops and servers.  While developing apps you need to make sure that the CPU is not tied up to that extent that calls can’t be received.  The phone’s operating system does not get crashed by leaking lots of memory  The mobile app does not fade into the background when calls/messages come or need to be sent. Challenges in Smart Phone Programming
  2. HISTORY (+Features) OF ANDROID • Andy Rubin Founded Android Corporation

    in Palo Alto , California, United States in October,2003 (Originally intended for camera but shifted to smartphones later because of low market for camera only) • On 17th August, 2005 Google Acquired Android Inc . • Goal of Android Project was to create a successful real-world product that improves the mobile experience for end users. • OHA was formed (led by google) in 2007 to advance open standards, • provide services and deploy handsets using the Android Platform. • Android is Open Source and anyone can customize as per their own requirements
  3. What is Android ? • Android is software stack for

    mobile devices that includes an operating system, middleware and key applications. • Android OS is a Linux Based operating system • The Android SDK provides the tools and APIs necessary to begin developing applications using the Java programming language. It supports most of the Java SE except for the AWT and Swing. • Android offers its own optimized JVM to run the compiled Java class files in order to counter the handheld device limitations such as memory ,processor speed and power. • Application framework enabling reuse and replacement of components. • Integrated browser(based on the open source WebKit engine), Optimized graphics powered by a custom 2D/3D Graphics library and also supported with OpenGL ES 1.0 – 3.0
  4. Android Versions, Codename and API VERSIONS CODENAME API 1.5 CUPCAKE

    3 (VIDEO RECORDING,3rd Party KB,WIDGETS) 1.6 DONUT 4 ( ANDROID MARKET, TEXT TO SPEECH, Universal Search) 2.1 ÉCLAIR 7 (ACCOUNT SYNCING,EMAIL ,CAMERA IMP.) 2.2 FROYO 8 (Wi-Fi Hotspot, Adobe Flash Support, Perf. Improvement) 2.3 GINGER BREAD 9 and 10 (VoIP Support, Download Manager, Faster UI) 3.0, 3.1 and 3.3 HONEYCOMB 12 and 13(Tablet Support, Tabbed Browsing etc) 4.0 ICE-CREAM SANDWICH 15 (Facial Recognition, APIs to reduce fragmentation) 4.1,4.2 and 4.3 Jelly Bean 16,17 and 18 (Better NFC enabled Apis, Android Beam improvements, Internationalization, Face Unlock, Improved Notifications etc) 4.4 Kitkat 19 (Better Multitasking, Immersive UI ,ART and a lot more) L (5.0) Preview is out 20(Material Design, Android TV, Auto, Work,Wear etc)
  5. Key Points of Android Application Framework • Each application runs

    in its own process and also has its own virtual machine (VM). Each Application is assigned a unique Linux user ID. • Dalvik VM takes the generated Java class files and combines them into one or more Dalvik Executable (.dex) files .It reuses the duplicate information from multiple class files , effectively reducing the space requirement by half from a traditional .jar file . • Dalvik VM relies on the Linux Kernel for underlying functionality such as threading and low- level memory management. Registers are used as the primary units of data storage instead of the stack. • Unlike applications on most other systems, Android applications don’t have a single entry point for everything in the application. Rather they have essential components that the system can instantiate and run as required.
  6. ACTIVITIES • BUILDING BLOCK OF THE USER INTERFACE • An

    application may have one or any number of activities . One of the activities is marked as the first one that should be presented when the application starts. • It is like a frame in AWT or an Android analogue of window in a desktop application. • The visual content of the window of an activity is provided by a hierarchy of views - objects derived from the base View class. • VIEW HIERARCHY IS PLACED WITHIN AN ACTIVITY’S WINDOW by the Activity.setContentView() method
  7. SERVICES, CONTENT PROVIDERS & BROADCAST RECEIVERS SERVICES doesn’t have a

    visual user interface, but rather runs in the background for an indefinite period of time as per the requirement. CONTENT-PROVIDERS provides a level of abstraction for any data stored on the device that is accessible by multiple applications. The System, or applications will send out broadcasts from time to time , for everything from the battery getting low , to when the screen turns off , to when connectivity changes from Wi-Fi to mobile data. A BROADCAST RECEIVER can arrange to listen for these broadcasts and respond accordingly.
  8. INTENTS AND ITS VERSATILE FUNCTIONALITIES • Intents are asynchronous messages

    which allow application components to request functionality from other Android components. • Intents allow you to interact with components from their own and other applications. For example an activity can start an external activity for taking a picture • It is mainly used to:  Start the service  Launch an activity  Display a web page  Display a list of contacts  Broadcast a message  Dial a phone call etc.
  9. SIGNIFICANCE OF ANDROIDMANIFEST.XML • Manifest (structured XML file)provides essential information

    about the application to the Android system, information the system must have before it can run any of the application’s code. • It is also used for naming any libraries the application needs to be linked against and identifying any permission the application needs to be granted. • It mainly includes:  Elements  Attributes  Application Icon name  APIS and Versions supported  Ability to support multiple screens.  Intent Filters
  10. Supporting Multiple Screens • Android runs on a variety of

    devices that offer different screen sizes and densities. • There are four dominant “form factors” :  Phones  Tablets  The Television  The Wearable (smart watches, Google glass ,etc.)  Cars/Automobiles, Air-plane seat-back entertainment centers. • Using Configuration qualifiers:  res/layout/my-layout.xml // layout for normal screen size (“default”)  res/layout-small/my-layout.xml // layout for small screen size  res/layout-large/my-layout.xml // layout for large screen size  res/layout-xlarge/my-layout.xml // layout for extra large screen size
  11. Supporting Multiple Screens (Cont.) • Range of Screens Supported :(Classified

    on screen densities)  xlarge screens are at least 960dp x 720dp  large screens are at least 640dp x 480dp  normal screens are at least 470dp x 320dp  small screens are at least 426dp x 320dp • Best Mechanisms to support Multiple Screen Sizes:  Explicitly declare in the manifest which screen sizes your app supports.  Designing alternative layouts and drawables.  Using Fragments.
  12. APPS ,PACKAGES AND BUILD PROCESS • Given a bucket of

    source code and a basket of resources, the Android build tools will give you an application as a result . The application comes in the form of an APK file . It is the APK file that you will upload to the Play Store or distribute by other means.