1 / 59

Android

Android. Introduction to Android. Mobile application development.

kineta
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 Introduction to Android

  2. Mobile application development • Mobile application development is the process by which application software is developed for small low-power handheld devices such as personal digital assistants, enterprise digital assistants or mobile phones. These applications are either pre-installed on phones during manufacturing, or downloaded by customers from various mobile software distribution platforms

  3. Execution Enviornment • Android • Ios(Xcode is the development environment forthe iOS SDK. ) • BlackBerry(Third-party developers can write software using the available BlackBerry classes,) • HP webOS • Symbian OS.(February 11, 2011, Nokia announced that it would migrate away from Symbian to Windows Phone 7,Symbian platform was created by merging and integrating software assets contributed by Nokia, NTT DoCoMo, Sony Ericsson and Symbian Ltd). • Windows Mobile

  4. Continued : Android, Blackberry and J2ME uses Java Language for their development but their applications are not portable because of different hardware, SDK and API. Windows Phone 7 requires Windows Operating system for its development, the Visual Studio (only supported IDE for Windows Phone) and Emulator also works only in Windows environment. C# is the language of Windows Phone 7 which is not used by any other platform. iPhone requires Macintosh Operating System and XCodeis the IDE for iPhone. Objective C is used for the development of iOS

  5. Android • Android is an open source software stack that includes the operating system,middleware and the key mobile applications along with a set of API libraries.

  6. Android • A free open source operating system for mobile devices • An open source development platform for creating mobile applications. • Devices, particularly mobile phones, that run the android operating system and the applications created for it.

  7. What is Android • A software platform and operating system for mobile devices • Based on the Linux kernel • Developed by Google and later the Open Handset Alliance (OHA) • Allows writing managed code in the Java language • Possibility to write applications in other languages and compiling it to ARM native code (support of Google? No) • Unveiling of the Android platform was announced on 5 November 2007 with the founding of OHA

  8. Introduction • Android is an operating system based on Linux with a Java programming interface. • The Android Software Development Kit (Android SDK) provides all necessary tools to develop Android applications. This includes a compiler, debugger and a device emulator, as well as its own virtual machine to run Android programs. • Android is officially guided by the Open Handset Alliance. In reality Google leads the project. • Android allows background processing, provides a rich user interface library, supports 2-D and 3-D graphics using the OpenGL libraries, access to the file system and provides an embedded SQLite database.

  9. Open handset alliance • A commitment to openness, a shared vision for the future, and concrete plans to make the vision a reality. • Welcome to the Open Handset Alliance™, a group of 84 technology and mobile companies who have come together to accelerate innovation in mobile and offer consumers a richer, less expensive, and better mobile experience. Together we have developed Android™, the first complete, open, and free mobile platform. • We are committed to commercially deploy handsets and services using the Android Platform.

  10. introduction • What is the Open Handset Alliance (OHA)? It's a consortium of several companies

  11. History of Android • 2005 Google buys Android, Inc. The world thinks a "gPhone" is about to come out… • Everything goes quiet for a while. • 2007 Open Handset Alliance is announced. Android is officially open-sourced. • 2008 Android SDK 1.0 is released. The G1 phone, manufactured by HTC, and sold by the wireless carrier T-Mobile USA, follows shortly afterwards. • 2009 sees a proliferation of Android-based devices. New versions of the operating system: Cupcake (1.5), Donut (1.6), and Eclair (2.0 and 2.1) are released. 20+ devices run Android. • 2010 Android is 2nd only to RIM as best-selling smart phone platform. Froyo (Android 2.2) is released and so are 60+ devices that run it.

  12. What a Desserts (:-

  13. Android SDK Features

  14. Android SDK features • The true appeal of Android as a development enviornment lies in the APIs It provides. • No licensing,distribution or development fees or release approval processes • Wi-fi hardware access • GSM,EDGE and 3G netoworks for telephony or data transfer enabling you to make or receive the calls or SMS messages or to send or retrieve data across mobile networks. • Comprehensive API for location based services such as GPS • Full multimedia hardware control ,including playback and recording with the camera and microphone • APIs for using sensor hardware,includingaccelometers and the compass • Libraries for using the Bluetooth for peer to peer data transfer. • IPC message passing • Shared data store

  15. Continued • Backgroun applications and processes • An integrated open source HTML5 web kit based browser • Full support for applications that integrate map controls as part of their user interface • Support for 2D and 3D graphics. • Media libraries for playing and recording a variety of audio/video or still image formats • Localization through a dynamic resource framework • An application framework the encourages reuse of application compnents and the replacement of native applications.

  16. Access to hardware ,including camera ,GPS and Accelerometer(SDK FEATURES ) • The android SDK includes APIs for location based hardware(such as GPS),the camera,audio,networkconnections,wi-fi ,bluetooth,accelometers , touchscreen and power management.

  17. Background services(Features) • Android supports applications and services designed to run invisibly in the backgroun. • Background services make it possible to create invisible application component that perform automatic processing without direct user interaction,Backgound execution allows your applications to become event driven and to support regular updates,which is perfect for market prices,gererating location-based alertsor prioritizing and prescreening incoming calls and sms messages

  18. SQLite Database for Data Storage and Retreival(Features) • Android provides a lightweight relational database for each application using SQLite,your application can take advantage of this managed relational database engine to store data securely and efficiently. • By default each application database is sandbox,its contents is available only to the application that created it -----but content providers supply a mechanizm for the managed sharing of these application databases.

  19. Share Data and interapplicationcommunication(Features) • Android include three techniques for transmitting information from your application for use elsewhere----Notifications,Intents,and content providers.

  20. Android Applications

  21. Native Android Applications • An e-mail client • An SMS management application • A full PIM (personal information management)suite including a calendar and contacts lists • A Webkit-based web browser • A music player and picture gallery • A camera and video recording applications • A calculator • The home screen • An Alarrm clock

  22. Android is designed to support a large variety of hardware platforms,from WVGA phones with hard keyboards to QVGA devices with resistive touchscreens

  23. Proprietary Android Applicatiosn • Android Market Client:-for downloading third-party Android applicatiosn. • Google Maps:-application including street view,drivingdirections,satellite view and traffic conditions. • Gmail mail Client • Google Talk instant-messaging client • YouTube video player. The open source nature of android means that carriers and OMEs can customize the user interface and the applications bundled with each Android device,Several OEMs have done this ,icluding HTC with the Sense UI,Motorala with MotoBlur and sonyEricssons custom UI. The look and feel of userinterface may vary,but your application will function in the same way across all compatible android devices (it means all compatible devices remains consistent across OEM and carrier varriation.

  24. First android phone(T-mobile G1)

  25. Android Application Development Process

  26. How mobile application runs

  27. The APK • An application is a single APK (application package) file. An APK file roughly has three main components. It consists of all your Dalvik executable code (Java code compiled automatically to Dalvik executable) plus all your resources (everything that is not code, such as images, layouts, etc.). Additionally, it may contain some native code as well. Dalvik executable: this is all your Java source code compiled down to Dalvik executable. This is the code that runs your application. • Resources: resources are everything that is not code. Your application may contain number of images, audio/video clips, as well as numerous XML files describing layouts, language packs, and so on. Collectively, these items are resources. • Native libraries: optionally, your application may include some native code, such as C/C++ libraries. These libraries could be packaged together with your APK file.

  28. Intro to development framework • Android applications are written with java as programinglangurage but executed by a custeom virtual machine called Dalvikrather than by a java VM. • Each android application runs in a separate process with in its own Dalvik instance ,relinquishing all responsibility for memory and process management to the Android run time,which stops and kills process as necessary to manage the resources

  29. continued • Dalvik and android run time sits at the top of the linux kernel that handles the lowlevel hardware interaction,including the drivers and memory management ,while a set of APIs provides access to all the underlying services ,features and hardware.

  30. How to develop android application Android applications are primary written in the Java programming language. The Java source files are converted to Java class files by the Java compiler. Android provides a tool dx which converts Java class files into a dex (Dalvik Executable) file. All class files of one application are placed in one compressed .dex file. During this conversion process redundant information in the class files are optimized in the .dex file. For example if the same String in different class file is found, the .dex file is stored only once and reference this String in the corresponding classes. .dex files are therefore much smaller in size then the corresponding class files. The .dex file and the resources of an Android project, e.g. the images and XML files are packed into an .apk (Android Package) file. The program aapt (Android Asset Packaging Tool) perform this packaging. The resulting .apk file contains all necessary data to run the Android application and can be deployed to an Android device via the "adb" tool. The Android Development Tools (ADT) allows that all these steps are performed transparent to the user; either within Eclipse or via the command line. If you use the ADT tooling you press a button or run a script and the whole Android application (.apk file) will be created and deployed.

  31. Software Development Kit(SDK)

  32. SDK • Android software development kit includes everything you need to start developing,testing,and debugging Android application,it includes • Android APIs:-libraries that provide developer access to the Android Stack.These are the same libraries used at google to create native android applications

  33. Development Tools:-so you can turn android source code into executable Android applications,the SDK includes several development tools that let you compile and debug your application. • The Android Virtual Device Manager and Emulator:- All android application run with in the Dalvik VM. Full Documentation:- Sample code Online support

  34. SDK • SDK includes everything that you need to start developing,testing and debuging android applications • Android API’s:The core of SDK is android APIs libraries that provide developer access to the Android stack. • Development tools: • The android virtual device manager and Emulator: FullDocumentation: Samplecode Online support

  35. Android Software Stack

  36. Linux kernel • provides abstraction between the hardware and the rest of the stack, responsible for device drivers (Camera , WiFi, etc…), resources management , power management, security and net working. • There are many good reasons for choosing Linux as the base of the Android stack. Some of the main ones are portability, security, and features.

  37. C/C++ Libraries(native libraries) • Native libraries are C/C++ libraries often taken from the open source community in order to provide necessary services to Android application layer. They include: • WebKit: a fast web rendering engine used by Safari, Chrome, and other browsers • SQLite: a full-featured SQL database • Apache Harmony: an open source implementation of Java • OpenGL: 3D graphics libraries • OpenSSL: the secure socket layer • and many others • While many of these libraries are taken as-is, one notable exception is Bionic. Bionic is basically a rewritten version of Standard C Library. The reason for Bionic is two fold: Technology: to make it purpose-built for tiny battery powered devices License: to make it license-friendly to others who may want to adopt it and change it

  38. The Android Runtime • includes Core libraries and the DalvikVitualMachine.The Core libraries provide most of java libraries + additional Android libraries.The Dalvik VM provides (Just In Time) JIT compilation. the VM is optimized to run multiple instances of VMs. As Java applications access the core libraries each application has its own VM

  39. The Android Application Framework • Provides classes required to develop an Android application and abstraction between hardware access. the Android Java API’s main library include telephony, content providers (data), resources, locations and UI.

  40. App frmework(continued) • The application framework is a rich environment that provides numerous services to you, the app developer,. This is the part of the platform that is best documented and extensively covered. That is because it is this layer that enables the mass-market of developers to get creative and be empowered to create fantastic applications. • In application framework layer, you will find numerous Java libraries specifically built for Android. You will also find many services (or managers) that provide the ecosystem of capabilities your application can tap into, such as location, sensors, WiFi, telephony and so on • As you explore the Android application development, most of your focus will be on this part of the stack. You will get to use many of the application framework components yourself.

  41. Application Layer • all Android applications(native or third party) are built on the application layer using the same API. • So Android applications are written in Java, but remember it is not Java ME (Mobile Edition). It’s just Most of J2SE libraries + Android’s own Java libraries.

  42. Android Application Architecture

  43. Android Application Architecture • Android architecture encourages component reuse allowing you to publish and share activities, services and data between applications with security restrictions defined by you. This enables developers to include out of the box components such as the phone dialer or contact manager to their applications, or add new functionalities to them.

  44. Application Architecture • Activity Manager: which controls the life cycle of the activities, activities can be compared to the windows or web forms they carry the controls (views) that construct the interface, an activity represents a single screen.

  45. Application Architecture • Views: the UI components that construct the interface. They can be compared to the swing or windows forms controls • Notification Manger: provides a consistent mechanism to notify or alert users. • Content Providers: lets applications to share data between them. • Resources Manager: much like the ASP.NET resources concept. Enables the developer to store resources such as strings or images.

  46. Secutiy and permissions • During deployment on an Android device, the Android system will create a unique user and group ID for every Android application. Each application file is private to this generated user, e.g. other applications cannot access these files. • In addition each Android application will be started in its own process. • Therefore by means of the underlying Linux operating system, every Android application is isolated from other running applications. A misbehaving application cannot easily harm other Android applications.

  47. Android Applications Security

  48. Security and permissions • If data should be shared the application must do this explicitly, e.g. via a Service or a ContentProvider. • Android also contains a permission system. Android predefines permissions for certain tasks but every application can also define its own permissions. • An application must declare in its configuration file (AndroidManifest.xml) that it requires certain permissions. • Depending on the details of the defined permission, the Android system will during installation either automatically grant the permission, reject it or ask the user if he grants these permissions to the application.

More Related