Confidential © 2009 Teleca AB Dual Display for Android Applications Gururaj N 21st Jan, 2011 v0.2.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Android Application Development A Tutorial Driven Course.
Google Android Introduction to Mobile Computing. Android is part of the build a better phone process Open Handset Alliance produces Android Comprises.
310KM M-Commerce Application Selection of Mobile Platform Group 4 Choy Chun Lung, Lawrence Hui Yiu Ting, Eddy Chan Ki Yin, CKY Liu Tsz Ping, Scott.
Android OS : Core Concepts Dr. Jeyakesavan Veerasamy Sr. Lecturer University of Texas at Dallas
Introduction.  Professor  Adam Porter 
Android architecture overview
Android Platform Overview (1)
All About Android Introduction to Android 1. Creating a New App “These aren’t the droids we’re looking for.” Obi-wan Kenobi 1. Bring up Eclipse. 2. Click.
App Development on Android
The Science of Digital Media Microsoft Surface 7May Metropolia University of Applied Sciences Display Technologies Seminar.
1 CSCE 4013: Mobile Systems Programming Nilanjan Banerjee Mobile Systems Programming University of Arkansas Fayetteville, AR
Android 101 Application Fundamentals January 29, 2010.
Android and Project Structure. Android Android OS – Built on Linux Kernel – Phones – Netbooks – Readers – Other???
Mobile Application Development
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Introduction to Android Platform Overview
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Building Trusted Path on Untrusted Device Drivers for Mobile Devices
Android Introduction Platform Overview.
Mobile Application Development with ANDROID Tejas Lagvankar UMBC 29 April 2009.
Mobile Application Development with ANDROID. Agenda Mobile Application Development (MAD) Intro to Android platform Platform architecture Application building.
About me Yichuan Wang Android Basics Credit goes to Google and UMBC.
1 Input/Output. 2 Principles of I/O Hardware Some typical device, network, and data base rates.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
1 Skip Cave Chief Scientist, Intervoice Inc. Multimodal Framework Proposal.
MVC pattern and implementation in java
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Android Programming By Mohsen Biglari Android Programming, Part1: Introduction 1 Part1: Introduction By Mohsen Biglari.
01. Introduction to Android Prof. Oum Saokosal Master of Engineering in Information Systems, South Korea
Device Drivers.
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
Eric Keller, Evan Green Princeton University PRESTO /22/08 Virtualizing the Data Plane Through Source Code Merging.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
DUE Hello World on the Android Platform.
16 Services and Broadcast Receivers CSNB544 Mobile Application Development Thanks to Utexas Austin.
Android for Java Developers Denver Java Users Group Jan 11, Mike
ANDROID 응용 프로그래밍 과정 – 목차 - 안드로이드란 - 안드로이드가 만들어지게 된배경 - 안드로이드의 철학 - 안드로이드 환경설정 ( SDK download, eclipse plug-in 설정, 간단한 프로그램 실행 ) - 안드로이드 동작원리 - 안드로이드 핵심.
Folio3 IPhone Training Session 1 Presenter: Imam Raza.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
ANDROID L. Grewe Components  Java Standard Development Kit (JDK) (download) (latest version)  AndroidStudio.
Processes Introduction to Operating Systems: Module 3.
ANDROID BY:-AANCHAL MEHTA MNW-880-2K11. Introduction to Android Open software platform for mobile development A complete stack – OS, Middleware, Applications.
Created By. Jainik B Patel Prashant A Goswami Gujarat Vidyapith Computer Department Ahmedabad.
1 Android Introduction Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Mobile Application Development with ANDROID Umang Patel(6537) LDCE.
1 Android Workshop Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
1 Get All Answers Get All Answers. Contents History of Android Android Fragmentation The Role of Google Features and Architecture Android Software Development.
By: Eliav Menachi.  Android custom 2D graphics library  OpenGL ES 1.0 for high performance 3D graphics.
Android operating system N. Sravani M. Tech(CSE) (09251D5804)
By Adam Reimel. Outline Introduction Platform Architecture Future Conclusion.
CHAPTER 6 Threads, Handlers, and Programmatic Movement.
Accelerometer based motion gestures for mobile devices Presented by – Neel Parikh Advisor Committee members Dr. Chris Pollett Dr. Robert Chun Dr. Mark.
The Ingredients of Android Applications. A simple application in a process In a classical programming environment, the OS would load the program code.
Android. Android An Open Handset Alliance Project A software platform and operating system for mobile devices Based on the Linux kernel Developed by Google.
Android Training in Chandigarh. What is Android Android is a mobile operating system based on the Linux Kernel. The goal of android project is to create.
Introduction to Operating Systems Concepts
Android Mobile Application Development
Android Application -Architecture.
Mobile Applications (Android Programming)
chapter 6- Android Introduction
Lecture 8: Graphics By: Eliav Menachi.
SOFTWARE DEVELOPMENT KIT-ios and Blackberry
Activities and Intents
Scaling of Eclipse on High Density Displays
Application Development A Tutorial Driven Course
Korea Software HRD Center
Introduction to Android
Presentation transcript:

Confidential © 2009 Teleca AB Dual Display for Android Applications Gururaj N 21st Jan, 2011 v0.2

Confidential © 2009 Teleca AB Agenda Introducing Teleca History of Multi Display Dual Display Mobile Devices Teleca’s experience in Dual Display for Android Devices QA 2

Confidential © 2009 Teleca AB 3 Teleca is the only player in segment with comprehensive onshore/offshore global delivery footprint across all major markets We have 2000 mobile software engineers available worldwide Teleca is the only player in segment with comprehensive onshore/offshore global delivery footprint across all major markets We have 2000 mobile software engineers available worldwide Introducing Teleca

Confidential © 2009 Teleca AB Introducing Teleca History of Multi Display Dual Display Mobile Devices Teleca’s experience in Dual Display for Android Devices QA Agenda 4

Confidential © 2009 Teleca AB History of Multi-Monitor (1) – PC and TV 5 Dual Monitors at Work Place Picture in Picture Multi monitor use case  Engineer needs as bigger screen possible to enhance productivity  HW Support – two video ports, or add second video card  OS Support – Adjust display properties PIP use case  Two programs side–by–side and audio output of one program going into speaker and another going to headset  Two tuner built into TV set OR one tuner being external source like DVD player.

Confidential © 2009 Teleca AB History of Multi-Monitor (2) – Mobile Phones 6 Multi display Mobile Phone usecases  The secondary display is used typically for notifications ( messages, incoming call ) and Clock  HW Support – two display drivers  OS Support – Adjust display properties  Separate applications running on two screen Disadvantages  Cannot write applications for secondary display  Only one display is active at any time.  Low resolutions

Confidential © 2009 Teleca AB Introducing Teleca History of Multi Display Dual Display Mobile Devices Teleca’s experience in Dual Display for Android Devices QA Agenda 7

Confidential © 2009 Teleca AB Dual Display Mobile Devices (1) 8 Samsung Continuum Acer Iconia Samsung Continuum Use cases  Dedicated Ticker Display for displaying Music player controls, RSS feeds, Social network site updates, Incoming call notification.  The idea seems to be use the second display for dynamically changing data without affecting the activities user does on main screen Acer Iconia  Concept laptop.  Used as e-Reader  One of the display can become Soft- Keyboard.

Confidential © 2009 Teleca AB Dual Display Mobile Devices (2) 9 HW Support  Two different displays  Two different frame buffers and drivers  One display virtually split into two displays  Single virtual frame buffer to support two independent displays SW Support  Framework changes to support dual displays  SDK changes to program applications specific to Dual display  Currently not available, mostly proprietary

Confidential © 2009 Teleca AB Introducing Teleca History of Multi Display Dual Display Mobile Devices Teleca’s experience in Dual Display for Android Devices QA Agenda 10

Confidential © 2009 Teleca AB Teleca’s experience in Dual Display for Android (1) 11 Teleca Worked on all aspects of Dual Display on Android Teleca Worked on all aspects of Dual Display on Android

Confidential © 2009 Teleca AB Teleca’s experience in Dual Display for Android (2) Teleca built Dual Display for Android with Texas Instruments Demonstrated at MWC 2009 Development Environment  TI Zoom3(OMAP 4430) with Dual Display Support (each display 864x480)  Android 2.0 ( Éclair ) 12

Confidential © 2009 Teleca AB Teleca’s experience in Dual Display for Android (3) - Components Android Components involved in Dual Display  Applications - need to define onto which display their Activities should go.  Activity Manager – launch application’s activities onto the right display.  Window Manager – needs to properly handle two Activity stacks and two window stacks  Surface Flinger – needs to handle layer composition for two displays.  OpenGL / EGL – needs to support one context for each display  Linux Kernel / Driver – support for two secondary display for output and touch input 13

Confidential © 2009 Teleca AB Teleca’s experience in Dual Display for Android (4) - Design Approaches for Window Manager Support Single Window Manager concept  This concept is based on an extension of the existing Window Manager for the second display. The WindowManagerService would be extended to support a second stack of activities and a second stack of windows.  The Activity Manager would –based- on the applications preference or the preference of an Activity create the Activity on the right stack of the Window Manager. Besides the changes to the ActivityManager the main changes need to be done in the WindowManagerService and the IWindowManager.aidl. 14 Pros Interface to only one Window Manager No additional thread Cons Very complex 11K lines of code Massive design changes to central Android component

Confidential © 2009 Teleca AB Teleca’s experience in Dual Display for Android (5) - Design Approaches for Window Manager Support Second Window Manager  The concept proposes to duplicate the WindowManagerService code, rename it and instantiate an instance of this which handles the Activities and Windows for the second display.  All Stake holders need to interface with two Window Managers 15

Confidential © 2009 Teleca AB 16 Pros Simple concept with only minor changes to the actual implementation of the WindowManagerService; Standard WindowManagerService requires nearly no changes Easy to migrate to next version of Android Cons Synchronization of both WindowManagerService instances required in some parts Code duplication Increased memory usage due to a second instance of the service A number of stakeholders of WindowManagerService need to be modified Not too attractive solution from architecture point of view

Confidential © 2009 Teleca AB Teleca’s experience in Dual Display for Android (6) - Design Approaches for Window Manager Support Second Window Manager Service Instance  This concept proposes to modify the WindowManagerService and the IWindowManager.aidl code so that it can be instantiated twice. Each instance of the service would be responsible for one display then. The required changes haven’t been analysed in detail as this seemed to be more effort compared to previous approach. However from an architecture point of view this seems to be preferred.  The problem with this approach might be that the decision which WindowManagerService needs to be used might not always be possible and thus requiring modifications in the stakeholders. As a result the other approach was chosen 17

Confidential © 2009 Teleca AB 18

Confidential © 2009 Teleca AB Teleca’s experience in Dual Display for Android (7) - Design Approaches for Window Manager Support Single Logical Display  This concept proposes a single logical display implemented by the two physical displays. Applications would be able to use both screens.  This approach was not analysed in details but seems to have some drawbacks as well such as:  No real dual display concept  Additional layout problems when landscape and portrait will be support  Complex in case the two displays have different resolution Bitmap based secondary display  This concept is a bitmap-based solution which would create images which are then drawn onto the second screen. This is a very simple solution.  Pros:  Very simple solution from WindowManagerService point of view which might even be acceptable for clamshell device with small and simple UI on outer display  Cons:  Static solution which provides only simulated user input handling  Not usable for animated/rapid changing content 19

Confidential © 2009 Teleca AB Introducing Teleca History of Multi Display Dual Display Mobile Devices Teleca’s experience in Dual Display for Android Devices  Specific Implementation Details QA Agenda 20

Confidential © 2009 Teleca AB Teleca’s experience in Dual Display for Android - High Level Block Diagram 21 Linux Kernel Libraries Application Framework Android Runtime Applications Surface Flinger OpenGL bionic Display Driver 1 Keyboard Driver Pico DLP … Activity Manager PhoneHome Home 2 Gallery App. on second display OpenGL Application … View System Window Manager … Hardware Abstraction Layer Display Driver 2 Touch Input 2 Touch Input 1 Input 1 Window Manager 2 Modified New Not feasible

Confidential © 2009 Teleca AB Teleca’s experience in Dual Display for Android - Changes across the Android Stack Applications  Extensions to the AndroidManifest.xml The AndroidManifest.xml was extended to support the attribute “android:display” for the and the tag. The possible values are integer values, usually only used when the application or an Activity of the application wants to go on the second screen  Sample : 22

Confidential © 2009 Teleca AB  Extension to the applications resources  The interface of the resources was extended to allow an application to set the display programmatically. This is usually done in the onCreate() of an Activity: protected void onCreate(Bundle icicle) { super.onCreate(icicle); getResources().setApplicationDisplay(Display.DISPLAY2); }  The class Resource was extended with two interfaces: public int getApplicationDisplay(); public void setApplicationDisplay(int display);  The display values are defined in Display.java as: Display.DEFAULT_DISPLAY Display.DISPLAY2 23

Confidential © 2009 Teleca AB Activity Manager  The Activity Manager starts an Activity and as such needs to know onto which display an application wants to go. The Activity Manager then adds the Activity onto the Window Manager’s proper Activity stack.  The ActivityManagerService was extended by a number of changes:  Additional list of history entries for the second display which stores the stack of launched activities  Reference to WindowManagerService for the second display  Support to start, stop and resume activities for the second display  Support for separate Home Screen on second display. The second Home Screen itself was not implemented during the project. 24

Confidential © 2009 Teleca AB Window Manager  The Window Manager needs extensions to support two application/Activity stacks and two Window stacks. Additionally it needs to be made second display-aware.  Touch Events  Key Events  Rendering 25

Confidential © 2009 Teleca AB Surface Flinger 26 Linux Kernel Libraries Application Framework Applications Surface Flinger Application 2 Application 1 Application 3 Hardware Abstraction Layer Display Driver 1 /dev/graphics/fb0 Surface Surface Surface Surface Surface Display Driver 2 /dev/graphics/fb1 Clamshell Driver

Confidential © 2009 Teleca AB The standard Surface Flinger was extended two handle two stacks of layers, one for each display. Internally the Layers contain the buffer to be rendered. Additionally all the calls to OpenGL set the right OpenGL context before so that the OpenGL calls go to the right display. From the applications point of view the decision onto which display is drawn is done by the display parameter set in the Surface object. The applications don’t do this directly though. They define this either in the AndroidManifest.xml or by setting the display in the associated resources by a direct API call. The Activity Manager then decides onto which display an Activity wants to go and adds it to the correct Window Manager. The Window Manager then sets the proper display in the Surface object. Access permissions  To access the Surface Flinger the following permission is defined in the platforms AndroidManifest.xml (in frameworks/base/core/res/):  android.permission.ACCESS_SURFACE_FLINGER  The following public constructor of Surface is hidden from the SDK and requires this permission:  public Surface( SurfaceSession s, int pid, int display, int w, int h, int format, int flags) throws OutOfResourcesException; 27

Confidential © 2009 Teleca AB Linux Kernel / Drivers  /dev/graphics/fb0 – Framebuffer for default display  /dev/graphics/fb1 – Framebuffer for second display  /dev/input/event0 – HW keyboard  /dev/input/event1 – Touchable first display  /dev/input/event2 – Touchable second display 28

Confidential © 2009 Teleca AB Introducing Teleca History of Multi Display Dual Display Mobile Devices Teleca’s experience in Dual Display for Android Devices QA Agenda 29

Confidential © 2009 Teleca AB Resourcefully yours