SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Android 	Architecture
Agenda	 The Virtual Machine The stack Android application (Part 1) Android application (Part 2, next time) Overview Presentation 2
The Virtual Machine Overview Presentation 3
The stack Overview Presentation 4
The stack II Overview Presentation 5 Android is a layered environment built upon a foundation of Linux kernel. Android applications are written in Java programming language and they run in Dalvik Virtual Machine, an open source technology. Each Android application runs within an instance of the Dalvik VM, which in turn resides within a Linux-kernel managed process
The stack III Overview Presentation 6 Android platform layers:
The stack IV Overview Presentation 7 In more detail:
Application framework Overview Presentation 8 Developers have full access to the same framework APIs used by the core applications. The application architecture is designed to simplify the reuse of components; any application can publish its capabilities and any other application may then make use of those capabilities (subject to security constraints enforced by the framework). This same mechanism allows components to be replaced by the user. Underlying all applications is a set of services and systems, including: A rich and extensible set of Views that can be used to build an application, including lists, grids, text boxes, buttons, and even an embeddable web browser Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data  A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files A Notification Manager that enables all applications to display custom alerts in the status bar An Activity Manager that manages the lifecycle of applications and provides a common navigation backstack
Libraries System C library - a BSD-derived implementation of the standard C system library (libc), tuned for embedded Linux-based devices Media Libraries - based on PacketVideo'sOpenCORE; the libraries support playback and recording of many popular audio and video formats, as well as static image files, including MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG Surface Manager - manages access to the display subsystem and seamlessly composites 2D and 3D graphic layers from multiple applications LibWebCore - a modern web browser engine which powers both the Android browser and an embeddable web view SGL - the underlying 2D graphics engine 3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries use either hardware 3D acceleration (where available) or the included, highly optimized 3D software rasterizer FreeType - bitmap and vector font rendering SQLite - a powerful and lightweight relational database engine available to all applications Overview Presentation 9 Android includes a set of C/C++ libraries used by various components of the Android system. These capabilities are exposed to developers through the Android application framework. Some of the core libraries are listed below:
What are the main components of a Android application Part I, today Short introduction in Eclipse AndroidManifest.xml Activity Intents Application resources Layouts Localization Part II, next time Application preferences App Widgets Services broadcast receivers content providers Overview Presentation 10
What are the main components of a Android application Part I, today Short introduction in Eclipse AndroidManifest.xml Activity Intents Application resources Layouts Localization Part II, next time Application preferences App Widgets Services broadcast receivers content providers Overview Presentation 11
Demo development envirioment Overview Presentation 12
What are the main components of a Android application Part I, today Short introduction in Eclipse AndroidManifest.xml Activity Intents Application resources Layouts Localization Part II, next time Application preferences App Widgets Services broadcast receivers content providers Overview Presentation 13
The AndroidManifest.xml File Overview Presentation 14 Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest presents 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 names the Java package for the application. The package name serves as a unique identifier for the application.
The AndroidManifest.xml File It describes the components of the application — the activities, services, broadcast receivers, and content providers that the application is composed of. It names the classes that implement each of the components and publishes their capabilities (for example, which Intent messages they can handle). These declarations let the Android system know what the components are and under what conditions they can be launched. It declares which permissions the application must have in order to access protected parts of the API and interact with other applications. Overview Presentation 15
The AndroidManifest.xml File It also declares the permissions that others are required to have in order to interact with the application's components. It declares the minimum level of the Android API that the application requires. It lists the libraries that the application must be linked against Overview Presentation 16 List is not complete !!!!!
Site step: What is API level? Overview Presentation 17 API Level is an integer value that uniquely identifies the framework API revision offered by a version of the Android platform. The Android platform provides a framework API that applications can use to interact with the underlying Android system. The framework API consists of: ,[object Object]
A set of XML elements and attributes for declaring a manifest file
A set of XML elements and attributes for declaring and accessing resources
A set of Intents
A set of permissions that applications can request, as well as permission enforcements included in the systemEach successive version of the Android platform can include updates to the Android application framework API that it delivers.
Site step: permissions samples Overview Presentation 18 Location-based services 		android.permission.ACCESS_COARSE_LOCATION android.permission.ACCESS_FINE_LOCATION Accessing contact database 	android.permission.READ_CONTACTS android.permission.WRITE_CONTACTS Accessing calendars 		android.permission.READ_CALENDAR android.permission.WRITE_CALENDAR Changing general phone 	android.permission.SET_ORIENTATION 						settings android.permission.SET_TIME_ZONE android.permission.SET_WALLPAPER Making calls 				android.permission.CALL_PHONE android.permission.CALL_PRIVILEGED
Example AndroidManifest.xml  Overview Presentation 19 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"       package="eu.laracker" android:versionCode="1" android:versionName="1.0">     <uses-sdkandroid:minSdkVersion="7" />     <application android:icon="@drawable/icon" android:label="@string/app_name">         <activity android:name=".SuperSocial" android:label="@string/app_name">             <intent-filter>                 <action android:name="android.intent.action.MAIN" />                 <category android:name="android.intent.category.LAUNCHER" />             </intent-filter>         </activity>     </application> </manifest>
What are the main components of a Android application Part I, today Short introduction in Eclipse AndroidManifest.xml Activity Intents Application resources Layouts Localization Part II, next time Application preferences App Widgets Services broadcast receivers content providers Overview Presentation 20
Activity An activity is a core component of the Android platform. Each activity represents a task the application can do, often tied to a corresponding screen in the application user interface. Activity is to an application what a web page is to a website. (Sort of) Overview Presentation 21
Activities lifecycle Overview Presentation 22 Activities have a well defined lifecycle. The Android OS manages your activity by changing its state. Demo
What are the main components of a Android application Part I, today Short introduction in Eclipse AndroidManifest.xml Activity Intents Application resources Layouts Localization Part II, next time Application preferences App Widgets Services broadcast receivers content providers Overview Presentation 23
Intents Overview Presentation 24 Intents are to Android apps what hyperlinks are to websites. An application can call directly a service or activity (explicit intent) or asked the Android system for registered services and applications for an intent (implicit intents). Intents are asynchronous messages.
Intents / Starting activities Samples Overview Presentation 25 Standard Explicit intents : Intent intent = new Intent(getApplicationContext(), HelpActivity.class); startActivity(intent); Extra parameters: Intent intent = new Intent(getApplicationContext(), HelpActivity.class); intent.putExtra(“eu.laracker.supersocial.LEVEL”, 8); startActivity(intent); Intent callingIntent = getIntent(); inthelpLevel = callingIntent.getIntExtra(“eu.laracker.supersocial.LEVEL”, 1); Calling with result: startActivityForResult(new Intent(getApplicationContext(), HelpActivity.class);) onActivityResult(intrequestCode, intresultCode, Intent data);
Using Intents to Launch Other Applications Overview Presentation 26 Initially, an application may only be launching activity classes defined within its own package. However, with the appropriate permissions, applications may also launch external activity classes in other applications. Launching the built-in web browser and supplying a URL address Launching the web browser and supplying a search string Launching the built-in Dialer application and supplying a phone number Launching the built-in Maps application and supplying a location Launching Google Street View and supplying a location Launching the built-in Camera application in still or video mode Launching a ringtone picker Recording a sound
Using Intents to Launch Other Applications samples Overview Presentation 27 Launching the built-in web browser and supplying a URL address Implicit Intents: Uri address = Uri.parse(“http://www.planon-fm.com”); Intent surf = new Intent(Intent.ACTION_VIEW, address); startActivity(surf); AndroidManifest.xml <uses-permissionandroid:name="android.permission.INTERNET" /> Which browser is openend is unknown, Android OS looks at the registered intend filters.
Registering via Intentfilter sample I Overview Presentation 28 This filter declares the main entry point of a application.  ,[object Object]
The LAUNCHER category says that this entry point should be listed in the application launcher.,[object Object]
Site step: dialogs Overview Presentation 30 There are quite a few types of ready-made dialog types available for use in addition to the basic dialog. These are  ,[object Object]
CharacterPickerDialog
DatePickerDialog,
ProgressDialog
TimePickerDialog.You can also create an entirely custom dialog by designing an XML layout file Demo
What are the main components of a Android application Part I, today Short introduction in Eclipse AndroidManifest.xml Activity Intents Application resources Layouts Localization Part II, next time Application preferences App Widgets Services broadcast receivers content providers Overview Presentation 31
Examples of application resources Overview Presentation 32
Application resources Overview Presentation 33 You should always externalize resources such as images and strings from your application code, so that you can maintain them independently. Externalizing your resources also allows you to provide alternative resources that support specific device configurations such as different languages or screen sizes Resource types are defined with special XML tags and organized into specially named project directories. Some examples of /res subdirectories are /drawable, /layout, and /values.

Weitere ähnliche Inhalte

Was ist angesagt?

Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017Ivo Neskovic
 
Introduction to Android
Introduction to Android Introduction to Android
Introduction to Android Ranjith Kumar
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialmaster760
 
Android application development
Android application developmentAndroid application development
Android application developmentMadhuprakashR1
 
Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012Opersys inc.
 
Android Overview
Android OverviewAndroid Overview
Android OverviewRaju Kadam
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Javaamaankhan
 
Architecture your android_application
Architecture your android_applicationArchitecture your android_application
Architecture your android_applicationMark Brady
 
Android application structure
Android application structureAndroid application structure
Android application structureAlexey Ustenko
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application DevelopmentRamesh Prasad
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App DevelopmentTodd Burgess
 
Android architecture
Android architectureAndroid architecture
Android architectureHari Krishna
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidzeelpatel0504
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentAly Abdelkareem
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersBoom Shukla
 
Android and its feature
Android and its featureAndroid and its feature
Android and its featureShubham Kumar
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-pptSrijib Roy
 
My presentation on Android in my college
My presentation on Android in my collegeMy presentation on Android in my college
My presentation on Android in my collegeSneha Lata
 

Was ist angesagt? (20)

Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017Android - From Zero to Hero @ DEVit 2017
Android - From Zero to Hero @ DEVit 2017
 
Introduction to Android
Introduction to Android Introduction to Android
Introduction to Android
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012
 
Android Overview
Android OverviewAndroid Overview
Android Overview
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 
Architecture your android_application
Architecture your android_applicationArchitecture your android_application
Architecture your android_application
 
Android application structure
Android application structureAndroid application structure
Android application structure
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App Development
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Android overview
Android overviewAndroid overview
Android overview
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
 
Android Platform Architecture
Android Platform ArchitectureAndroid Platform Architecture
Android Platform Architecture
 
Android and its feature
Android and its featureAndroid and its feature
Android and its feature
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-ppt
 
My presentation on Android in my college
My presentation on Android in my collegeMy presentation on Android in my college
My presentation on Android in my college
 

Andere mochten auch

Building Mobile Application Using PhoneGap
Building Mobile Application Using PhoneGapBuilding Mobile Application Using PhoneGap
Building Mobile Application Using PhoneGapRajashekar Bhagavatula
 
Mobile payment i phone application
Mobile payment i phone applicationMobile payment i phone application
Mobile payment i phone applicationcaneren
 
Mobile phone applications
Mobile phone applicationsMobile phone applications
Mobile phone applicationsNazish khalid
 
Barrett School Store Mobile Phone Application Proposal
Barrett School Store Mobile Phone Application ProposalBarrett School Store Mobile Phone Application Proposal
Barrett School Store Mobile Phone Application ProposalFabeeha Ahmed
 
Loyalty & Rewards Points Application on your mobile phone, iPhone, Android
Loyalty & Rewards Points Application on your mobile phone, iPhone, AndroidLoyalty & Rewards Points Application on your mobile phone, iPhone, Android
Loyalty & Rewards Points Application on your mobile phone, iPhone, AndroidMike Taylor
 
Introduction To Mobile Application Development
Introduction  To  Mobile Application DevelopmentIntroduction  To  Mobile Application Development
Introduction To Mobile Application DevelopmentSteven James
 
Basic android development
Basic android developmentBasic android development
Basic android developmentUpanya Singh
 
Android Components & Manifest
Android Components & ManifestAndroid Components & Manifest
Android Components & Manifestma-polimi
 
Introduction to Android Programming
Introduction to Android ProgrammingIntroduction to Android Programming
Introduction to Android ProgrammingCourseHunt
 
Object Recognition in Mobile Phone Application for Visually Impaired Users
Object Recognition in Mobile Phone Application for Visually Impaired UsersObject Recognition in Mobile Phone Application for Visually Impaired Users
Object Recognition in Mobile Phone Application for Visually Impaired UsersIOSR Journals
 
2013 ieee human health monitoring mobile phone application by using the wirel...
2013 ieee human health monitoring mobile phone application by using the wirel...2013 ieee human health monitoring mobile phone application by using the wirel...
2013 ieee human health monitoring mobile phone application by using the wirel...tilottama_deore
 
Mobile Application
Mobile ApplicationMobile Application
Mobile ApplicationShyam Sir
 

Andere mochten auch (19)

Android Basic Components
Android Basic ComponentsAndroid Basic Components
Android Basic Components
 
Building Mobile Application Using PhoneGap
Building Mobile Application Using PhoneGapBuilding Mobile Application Using PhoneGap
Building Mobile Application Using PhoneGap
 
Mobile payment i phone application
Mobile payment i phone applicationMobile payment i phone application
Mobile payment i phone application
 
Mobile phone applications
Mobile phone applicationsMobile phone applications
Mobile phone applications
 
Practice of Android Reverse Engineering
Practice of Android Reverse EngineeringPractice of Android Reverse Engineering
Practice of Android Reverse Engineering
 
Barrett School Store Mobile Phone Application Proposal
Barrett School Store Mobile Phone Application ProposalBarrett School Store Mobile Phone Application Proposal
Barrett School Store Mobile Phone Application Proposal
 
Loyalty & Rewards Points Application on your mobile phone, iPhone, Android
Loyalty & Rewards Points Application on your mobile phone, iPhone, AndroidLoyalty & Rewards Points Application on your mobile phone, iPhone, Android
Loyalty & Rewards Points Application on your mobile phone, iPhone, Android
 
Introduction To Mobile Application Development
Introduction  To  Mobile Application DevelopmentIntroduction  To  Mobile Application Development
Introduction To Mobile Application Development
 
Basic android development
Basic android developmentBasic android development
Basic android development
 
Android Components & Manifest
Android Components & ManifestAndroid Components & Manifest
Android Components & Manifest
 
Introduction to Android Programming
Introduction to Android ProgrammingIntroduction to Android Programming
Introduction to Android Programming
 
Android Components
Android ComponentsAndroid Components
Android Components
 
Object Recognition in Mobile Phone Application for Visually Impaired Users
Object Recognition in Mobile Phone Application for Visually Impaired UsersObject Recognition in Mobile Phone Application for Visually Impaired Users
Object Recognition in Mobile Phone Application for Visually Impaired Users
 
2013 ieee human health monitoring mobile phone application by using the wirel...
2013 ieee human health monitoring mobile phone application by using the wirel...2013 ieee human health monitoring mobile phone application by using the wirel...
2013 ieee human health monitoring mobile phone application by using the wirel...
 
Android UI Design Tips
Android UI Design TipsAndroid UI Design Tips
Android UI Design Tips
 
Slideshare android
Slideshare androidSlideshare android
Slideshare android
 
Basic Android OS
Basic Android OSBasic Android OS
Basic Android OS
 
Mobile Application
Mobile ApplicationMobile Application
Mobile Application
 
Classification of drugs
Classification of drugs Classification of drugs
Classification of drugs
 

Ähnlich wie Android basic principles

architecture of android.pptx
architecture of android.pptxarchitecture of android.pptx
architecture of android.pptxallurestore
 
Android app development
Android app developmentAndroid app development
Android app developmentTanmoy Roy
 
Android development-tutorial
Android development-tutorialAndroid development-tutorial
Android development-tutorialilias ahmed
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java DevelopersMike Wolfson
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A NutshellTed Chien
 
Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architectureDilip Singh
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App DevelopmentMike Kvintus
 
Wifi Direct Based Chat And File Transfer Android Application
Wifi Direct Based Chat And File Transfer Android ApplicationWifi Direct Based Chat And File Transfer Android Application
Wifi Direct Based Chat And File Transfer Android ApplicationNitin Bhasin
 
Android presentation
Android presentationAndroid presentation
Android presentationImam Raza
 
Android Basic Presentation (Introduction)
Android Basic Presentation (Introduction)Android Basic Presentation (Introduction)
Android Basic Presentation (Introduction)RAHUL TRIPATHI
 
Android App Development Overview- HKInfoway Technologies.pdf
Android App Development Overview- HKInfoway Technologies.pdfAndroid App Development Overview- HKInfoway Technologies.pdf
Android App Development Overview- HKInfoway Technologies.pdfhkinfowaytech hkinfowaytech
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for BeginnersTripti Tiwari
 
01 what is android
01 what is android01 what is android
01 what is androidC.o. Nieto
 

Ähnlich wie Android basic principles (20)

architecture of android.pptx
architecture of android.pptxarchitecture of android.pptx
architecture of android.pptx
 
Android app development
Android app developmentAndroid app development
Android app development
 
Android development-tutorial
Android development-tutorialAndroid development-tutorial
Android development-tutorial
 
Android Introduction by Kajal
Android Introduction by KajalAndroid Introduction by Kajal
Android Introduction by Kajal
 
Android apps
Android appsAndroid apps
Android apps
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java Developers
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A Nutshell
 
Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architecture
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App Development
 
Wifi Direct Based Chat And File Transfer Android Application
Wifi Direct Based Chat And File Transfer Android ApplicationWifi Direct Based Chat And File Transfer Android Application
Wifi Direct Based Chat And File Transfer Android Application
 
Notes Unit2.pptx
Notes Unit2.pptxNotes Unit2.pptx
Notes Unit2.pptx
 
Android app development India
Android app development IndiaAndroid app development India
Android app development India
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Android Basic Presentation (Introduction)
Android Basic Presentation (Introduction)Android Basic Presentation (Introduction)
Android Basic Presentation (Introduction)
 
Android App Development Overview- HKInfoway Technologies.pdf
Android App Development Overview- HKInfoway Technologies.pdfAndroid App Development Overview- HKInfoway Technologies.pdf
Android App Development Overview- HKInfoway Technologies.pdf
 
Android Basic- CMC
Android Basic- CMCAndroid Basic- CMC
Android Basic- CMC
 
Android 2.1-cdd
Android 2.1-cddAndroid 2.1-cdd
Android 2.1-cdd
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for Beginners
 
01 what is android
01 what is android01 what is android
01 what is android
 

Kürzlich hochgeladen

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Kürzlich hochgeladen (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

Android basic principles

  • 2. Agenda The Virtual Machine The stack Android application (Part 1) Android application (Part 2, next time) Overview Presentation 2
  • 3. The Virtual Machine Overview Presentation 3
  • 4. The stack Overview Presentation 4
  • 5. The stack II Overview Presentation 5 Android is a layered environment built upon a foundation of Linux kernel. Android applications are written in Java programming language and they run in Dalvik Virtual Machine, an open source technology. Each Android application runs within an instance of the Dalvik VM, which in turn resides within a Linux-kernel managed process
  • 6. The stack III Overview Presentation 6 Android platform layers:
  • 7. The stack IV Overview Presentation 7 In more detail:
  • 8. Application framework Overview Presentation 8 Developers have full access to the same framework APIs used by the core applications. The application architecture is designed to simplify the reuse of components; any application can publish its capabilities and any other application may then make use of those capabilities (subject to security constraints enforced by the framework). This same mechanism allows components to be replaced by the user. Underlying all applications is a set of services and systems, including: A rich and extensible set of Views that can be used to build an application, including lists, grids, text boxes, buttons, and even an embeddable web browser Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files A Notification Manager that enables all applications to display custom alerts in the status bar An Activity Manager that manages the lifecycle of applications and provides a common navigation backstack
  • 9. Libraries System C library - a BSD-derived implementation of the standard C system library (libc), tuned for embedded Linux-based devices Media Libraries - based on PacketVideo'sOpenCORE; the libraries support playback and recording of many popular audio and video formats, as well as static image files, including MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG Surface Manager - manages access to the display subsystem and seamlessly composites 2D and 3D graphic layers from multiple applications LibWebCore - a modern web browser engine which powers both the Android browser and an embeddable web view SGL - the underlying 2D graphics engine 3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries use either hardware 3D acceleration (where available) or the included, highly optimized 3D software rasterizer FreeType - bitmap and vector font rendering SQLite - a powerful and lightweight relational database engine available to all applications Overview Presentation 9 Android includes a set of C/C++ libraries used by various components of the Android system. These capabilities are exposed to developers through the Android application framework. Some of the core libraries are listed below:
  • 10. What are the main components of a Android application Part I, today Short introduction in Eclipse AndroidManifest.xml Activity Intents Application resources Layouts Localization Part II, next time Application preferences App Widgets Services broadcast receivers content providers Overview Presentation 10
  • 11. What are the main components of a Android application Part I, today Short introduction in Eclipse AndroidManifest.xml Activity Intents Application resources Layouts Localization Part II, next time Application preferences App Widgets Services broadcast receivers content providers Overview Presentation 11
  • 12. Demo development envirioment Overview Presentation 12
  • 13. What are the main components of a Android application Part I, today Short introduction in Eclipse AndroidManifest.xml Activity Intents Application resources Layouts Localization Part II, next time Application preferences App Widgets Services broadcast receivers content providers Overview Presentation 13
  • 14. The AndroidManifest.xml File Overview Presentation 14 Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest presents 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 names the Java package for the application. The package name serves as a unique identifier for the application.
  • 15. The AndroidManifest.xml File It describes the components of the application — the activities, services, broadcast receivers, and content providers that the application is composed of. It names the classes that implement each of the components and publishes their capabilities (for example, which Intent messages they can handle). These declarations let the Android system know what the components are and under what conditions they can be launched. It declares which permissions the application must have in order to access protected parts of the API and interact with other applications. Overview Presentation 15
  • 16. The AndroidManifest.xml File It also declares the permissions that others are required to have in order to interact with the application's components. It declares the minimum level of the Android API that the application requires. It lists the libraries that the application must be linked against Overview Presentation 16 List is not complete !!!!!
  • 17.
  • 18. A set of XML elements and attributes for declaring a manifest file
  • 19. A set of XML elements and attributes for declaring and accessing resources
  • 20. A set of Intents
  • 21. A set of permissions that applications can request, as well as permission enforcements included in the systemEach successive version of the Android platform can include updates to the Android application framework API that it delivers.
  • 22. Site step: permissions samples Overview Presentation 18 Location-based services android.permission.ACCESS_COARSE_LOCATION android.permission.ACCESS_FINE_LOCATION Accessing contact database android.permission.READ_CONTACTS android.permission.WRITE_CONTACTS Accessing calendars android.permission.READ_CALENDAR android.permission.WRITE_CALENDAR Changing general phone android.permission.SET_ORIENTATION settings android.permission.SET_TIME_ZONE android.permission.SET_WALLPAPER Making calls android.permission.CALL_PHONE android.permission.CALL_PRIVILEGED
  • 23. Example AndroidManifest.xml Overview Presentation 19 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="eu.laracker" android:versionCode="1" android:versionName="1.0"> <uses-sdkandroid:minSdkVersion="7" /> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".SuperSocial" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
  • 24. What are the main components of a Android application Part I, today Short introduction in Eclipse AndroidManifest.xml Activity Intents Application resources Layouts Localization Part II, next time Application preferences App Widgets Services broadcast receivers content providers Overview Presentation 20
  • 25. Activity An activity is a core component of the Android platform. Each activity represents a task the application can do, often tied to a corresponding screen in the application user interface. Activity is to an application what a web page is to a website. (Sort of) Overview Presentation 21
  • 26. Activities lifecycle Overview Presentation 22 Activities have a well defined lifecycle. The Android OS manages your activity by changing its state. Demo
  • 27. What are the main components of a Android application Part I, today Short introduction in Eclipse AndroidManifest.xml Activity Intents Application resources Layouts Localization Part II, next time Application preferences App Widgets Services broadcast receivers content providers Overview Presentation 23
  • 28. Intents Overview Presentation 24 Intents are to Android apps what hyperlinks are to websites. An application can call directly a service or activity (explicit intent) or asked the Android system for registered services and applications for an intent (implicit intents). Intents are asynchronous messages.
  • 29. Intents / Starting activities Samples Overview Presentation 25 Standard Explicit intents : Intent intent = new Intent(getApplicationContext(), HelpActivity.class); startActivity(intent); Extra parameters: Intent intent = new Intent(getApplicationContext(), HelpActivity.class); intent.putExtra(“eu.laracker.supersocial.LEVEL”, 8); startActivity(intent); Intent callingIntent = getIntent(); inthelpLevel = callingIntent.getIntExtra(“eu.laracker.supersocial.LEVEL”, 1); Calling with result: startActivityForResult(new Intent(getApplicationContext(), HelpActivity.class);) onActivityResult(intrequestCode, intresultCode, Intent data);
  • 30. Using Intents to Launch Other Applications Overview Presentation 26 Initially, an application may only be launching activity classes defined within its own package. However, with the appropriate permissions, applications may also launch external activity classes in other applications. Launching the built-in web browser and supplying a URL address Launching the web browser and supplying a search string Launching the built-in Dialer application and supplying a phone number Launching the built-in Maps application and supplying a location Launching Google Street View and supplying a location Launching the built-in Camera application in still or video mode Launching a ringtone picker Recording a sound
  • 31. Using Intents to Launch Other Applications samples Overview Presentation 27 Launching the built-in web browser and supplying a URL address Implicit Intents: Uri address = Uri.parse(“http://www.planon-fm.com”); Intent surf = new Intent(Intent.ACTION_VIEW, address); startActivity(surf); AndroidManifest.xml <uses-permissionandroid:name="android.permission.INTERNET" /> Which browser is openend is unknown, Android OS looks at the registered intend filters.
  • 32.
  • 33.
  • 34.
  • 38. TimePickerDialog.You can also create an entirely custom dialog by designing an XML layout file Demo
  • 39. What are the main components of a Android application Part I, today Short introduction in Eclipse AndroidManifest.xml Activity Intents Application resources Layouts Localization Part II, next time Application preferences App Widgets Services broadcast receivers content providers Overview Presentation 31
  • 40. Examples of application resources Overview Presentation 32
  • 41. Application resources Overview Presentation 33 You should always externalize resources such as images and strings from your application code, so that you can maintain them independently. Externalizing your resources also allows you to provide alternative resources that support specific device configurations such as different languages or screen sizes Resource types are defined with special XML tags and organized into specially named project directories. Some examples of /res subdirectories are /drawable, /layout, and /values.
  • 42.
  • 43. Alternative resources are those that you've designed for use with a specific configuration. To specify that a group of resources are for a specific configuration, append an appropriate configuration qualifier to the directory name.Application resources Overview Presentation 34 Demo
  • 44. Sample resource file String Overview Presentation 35 You can use string resources anywhere your application needs to display text. You tag string resources with the <string> tag and store them in the resource file /res/values/strings.xml. <?xml version=”1.0” encoding=”utf-8”?> <resources> <string name=”app_name”>Name this App</string> <string name=”hello”>Hello</string> </resources> Referenced in XML: @string/hello Referenced in Java: getResources().getString(R.string.hello);
  • 45. Sample resource file Drawable Overview Presentation 36 Drawable resources, such as image files, must be saved under the /res/drawable project directory. Referenced in XML: @drawable/icon Referenced in Java: logoView.setImageResource(R.drawable.icon); AndroidManifest.xml snippet: <application android:icon="@drawable/icon" android:label="@string/app_name">
  • 46. Layouts (A world on his own) Overview Presentation 37 Layout files often define an entire screen and are associated with a specific activity, but they need not be. Layout resources can also define part of a screen and can be included within another layout. Layouts can also be created, modified, and used at runtime. However, in most cases, using the XML layout files greatly improves code clarity and reuse. Idea for next time ?????
  • 47. What are the main components of a Android application Part I, today AndroidManifest.xml Activity Intents Application resources Layouts Localization Part II, next time Application preferences App Widgets Services broadcast receivers content providers Overview Presentation 38
  • 48. Example AndroidManifest.xml Overview Presentation 39 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="eu.laracker" android:versionCode="1" android:versionName="1.0"> <uses-sdkandroid:minSdkVersion="7" /> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".SuperSocial" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
  • 49. Resources on the web http://developer.android.com/index.html http://www.vogella.de Tuturial http://developer.android.com/resources/tutorials/notepad/index.html Overview Presentation 40
  • 50. Henk Laracker Planon Thank you for your attention.