SlideShare uma empresa Scribd logo
1 de 14
Introduction
● Introduction
● Activity and Intent
● Resources
● Views and Layouts
● ActionBar
● Fragments
● Threading
● Services
● Storage
● Content Providers
Course structure
● Lists, Grids and Adapters
● Dialogs and Toasts
● Animations
● BroadcastReceivers
● AppWidgets
● Location
● Media
● Notifications
Android
Definition: Android is a stack of Contexts
Features:
● Open Source
● Based on Linux Kernel 3.x
● Runs dex-code (Dalvik Executable)
● Run on ARM and x86 architecture
● Supports OpenGL 1.1, 2.0, 3.0
● Uses SQLite
● Handles different input types
● Location services
● Used in Smartphone, Tablet, PC, TV, Wearable, Game
console...
Introduction
Versioni Android
09/03/2013 Google announces 1.000.000.000 Android devices in
the world.
Version distribution is based on Google Play accesses:
Introduction
Market Share
Introduction
Fragmentation
The main platform issue to deal with is Fragmentation.
● As said, the last Android release is never the most used. You
have to deal with, therefore, customers who demand the
integration of new features on the new releases, but not present
on previous ones.
● Devices with different display, form factor, resolution, memory,
CPU, sensors, etc ...
● The trend for manufacturers is to enlarge the terminals with a
ride to the higher resolution (Nexus 10: 2560x1600px)
● If all this were not enough, each new release of Android always
has its teething problems.
Introduction
Android SDK
Virtual Machine
● DVM (Dalvik Virtual Machine)
● ART (Android RunTime)
IDE
● Android Developer Tool (Eclipse)
● Android Studio (JetBrains IntelliJ)
Development tools
● DDMS (Dalvik Debug Monitor Service)
● ADB (Android Debug Gridge)
● Emulator
● Lint
Introduction
Android Documentation
References to the official Android documentation are as follows:
● Design: http://developer.android.com/design/index.html
● Develop: http://developer.android.com/develop/index.html
● Training: http://developer.android.com/training/index.html
● Guides: http://developer.android.com/guide/index.html
● JavaDoc: http://developer.android.com/reference/packages.html
● Tools: http://developer.android.com/tools/index.html
● Google Services:
http://developer.android.com/google/index.html
● Distribute: http://developer.android.com/distribute/index.html
Introduction
Android Application – The
Structure
An Android application is composed of 3 types of objects:
● AndroidManifest.xml
● Java code
● Internal resources
You can use a development tool called Android NDK (Native
Development Kit) to integrate native code in C and call it from Java
code using native interfaces.
The use of NDK is discouraged by Google, but it is necessary for
some applications such as the reading of PDF files or decoding of
media files.
Introduction
Android Application-
Components
The function blocks with which an application can interface with the
system are 4:
● Activities
● Services
● Broadcast Receivers
● ContentProviders
Each of these has a specific role, but no one is required to create
an application. The first 2 are subclasses of Context.
To notify the system of their presence and describe how they
should be managed, these elements have to be declared within a
xml file called AndroidManifest.
Introduction
Manifest
The Manifest file is required for all Android applications. It has the
purpose of:
● Declaring the package used (because this is the unique
identifier of the application inside the system).
● Describing the basic components integrated in the application.
● Determining which processes should be executed components
in.
● Declaring the permissions to access API, hardware, providers...
● Defining the application's compatibility with the terminal based
on the version of Android, the density and size of the display.
Introduction
AndroidManifest Structure
<?xml version="1.0" encoding="utf-8"?>
<manifest>
<uses-permission />
<permission />
<uses-sdk />
<uses-feature />
<supports-screens />
<compatible-screens />
<uses-library />
<application>
<activity>
<intent-filter>
<action />
<category />
<data />
</intent-filter>
</activity>
Introduction
<service>
<intent-filter>
</intent-filter>
<meta-data />
</service>
<receiver>
<intent-filter>
</intent-filter>
<meta-data />
</receiver>
<provider>
<grant-uri-permission />
<meta-data />
<path-permission />
</provider>
</application>
</manifest>
APK Android Package
Android applications are written in the Java language. The Android
SDK tools compile the code and allow you to produce an APK file:
Android Package, which is an archive file with a .apk suffix.
An APK file contains all the contents of an Android app and is the
file that Android devices use to install the application.
During installation the device copies the APK file to the internal
memory selecting all the resources to adapt them to its
configuration (we will see this later).
An APK is always signed with a certificate: the ADT generates a
debug certificate not valid for publication.
Introduction
Build
The ADT has a tool to export the APK which can then be published
on the Store. Once published an APK with a certificate, all
subsequent updates must be signed with the same certificate,
otherwise users must uninstall the application resulting in the
cancellation of the entire cache and persistent data stored on the
device from earlier versions.
It's possible to export multiple APK for publication in defining the
Manifest Destination: smartphone or tablet, Android versions, etc.
This practice is discouraged due to the reduced maintainability of
the code.
Introduction

Mais conteúdo relacionado

Mais procurados

Five android architecture
Five android architectureFive android architecture
Five android architectureTomislav Homan
 
Android chapter02-setup2-emulator
Android chapter02-setup2-emulatorAndroid chapter02-setup2-emulator
Android chapter02-setup2-emulatorguru472
 
Application Development - Overview on Android OS
Application Development - Overview on Android OSApplication Development - Overview on Android OS
Application Development - Overview on Android OSPankaj Maheshwari
 
Android Development
Android DevelopmentAndroid Development
Android Developmentmclougm4
 
Introduction to Moodle Development
Introduction to Moodle DevelopmentIntroduction to Moodle Development
Introduction to Moodle Developmentmoorejon
 

Mais procurados (6)

Five android architecture
Five android architectureFive android architecture
Five android architecture
 
Android chapter02-setup2-emulator
Android chapter02-setup2-emulatorAndroid chapter02-setup2-emulator
Android chapter02-setup2-emulator
 
Application Development - Overview on Android OS
Application Development - Overview on Android OSApplication Development - Overview on Android OS
Application Development - Overview on Android OS
 
Android
AndroidAndroid
Android
 
Android Development
Android DevelopmentAndroid Development
Android Development
 
Introduction to Moodle Development
Introduction to Moodle DevelopmentIntroduction to Moodle Development
Introduction to Moodle Development
 

Semelhante a Android App Development - 01 Introduction

Android workshop material
Android workshop materialAndroid workshop material
Android workshop materialReza Yogaswara
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_authlzongren
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopKasun Dananjaya Delgolla
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspectiveGunjan Kumar
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programmingPERKYTORIALS
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app developmentAbhishekKumar4779
 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android ApplicationNandini Prabhu
 
Android development classes in chandigarh : Big Boxx Academy
Android development classes in chandigarh : Big Boxx AcademyAndroid development classes in chandigarh : Big Boxx Academy
Android development classes in chandigarh : Big Boxx AcademyBig Boxx Animation Academy
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidzeelpatel0504
 
Android Jump Start
Android Jump StartAndroid Jump Start
Android Jump StartHaim Michael
 
Android development tutorial
Android development tutorialAndroid development tutorial
Android development tutorialMohammad Taj
 
Android Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start GuideAndroid Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start GuideSergii Zhuk
 
Unit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-assUnit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-assARVIND SARDAR
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application DevelopmentRamesh Prasad
 

Semelhante a Android App Development - 01 Introduction (20)

Android workshop material
Android workshop materialAndroid workshop material
Android workshop material
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspective
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android Application
 
Android development classes in chandigarh : Big Boxx Academy
Android development classes in chandigarh : Big Boxx AcademyAndroid development classes in chandigarh : Big Boxx Academy
Android development classes in chandigarh : Big Boxx Academy
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android
AndroidAndroid
Android
 
Android Jump Start
Android Jump StartAndroid Jump Start
Android Jump Start
 
Android development tutorial
Android development tutorialAndroid development tutorial
Android development tutorial
 
Android Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start GuideAndroid Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start Guide
 
Android My Seminar
Android My SeminarAndroid My Seminar
Android My Seminar
 
Unit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-assUnit 1-android-and-its-tools-ass
Unit 1-android-and-its-tools-ass
 
Android session-1-sajib
Android session-1-sajibAndroid session-1-sajib
Android session-1-sajib
 
Android : Deep dive into developing MobileApp using Android
Android : Deep dive into developing MobileApp using AndroidAndroid : Deep dive into developing MobileApp using Android
Android : Deep dive into developing MobileApp using Android
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 

Mais de Diego Grancini

Android App Development - 14 location, media and notifications
Android App Development - 14 location, media and notificationsAndroid App Development - 14 location, media and notifications
Android App Development - 14 location, media and notificationsDiego Grancini
 
Android App Development - 13 Broadcast receivers and app widgets
Android App Development - 13 Broadcast receivers and app widgetsAndroid App Development - 13 Broadcast receivers and app widgets
Android App Development - 13 Broadcast receivers and app widgetsDiego Grancini
 
Android App Development - 12 animations
Android App Development - 12 animationsAndroid App Development - 12 animations
Android App Development - 12 animationsDiego Grancini
 
Android App Development - 11 Lists, grids, adapters, dialogs and toasts
Android App Development - 11 Lists, grids, adapters, dialogs and toastsAndroid App Development - 11 Lists, grids, adapters, dialogs and toasts
Android App Development - 11 Lists, grids, adapters, dialogs and toastsDiego Grancini
 
Android App Development - 10 Content providers
Android App Development - 10 Content providersAndroid App Development - 10 Content providers
Android App Development - 10 Content providersDiego Grancini
 
Android App Development - 09 Storage
Android App Development - 09 StorageAndroid App Development - 09 Storage
Android App Development - 09 StorageDiego Grancini
 
Android App Development - 08 Services
Android App Development - 08 ServicesAndroid App Development - 08 Services
Android App Development - 08 ServicesDiego Grancini
 
Android App Development - 07 Threading
Android App Development - 07 ThreadingAndroid App Development - 07 Threading
Android App Development - 07 ThreadingDiego Grancini
 
Android App Development - 06 Fragments
Android App Development - 06 FragmentsAndroid App Development - 06 Fragments
Android App Development - 06 FragmentsDiego Grancini
 
Android App Development - 05 Action bar
Android App Development - 05 Action barAndroid App Development - 05 Action bar
Android App Development - 05 Action barDiego Grancini
 
Android App Development - 04 Views and layouts
Android App Development - 04 Views and layoutsAndroid App Development - 04 Views and layouts
Android App Development - 04 Views and layoutsDiego Grancini
 
Android App Development - 02 Activity and intent
Android App Development - 02 Activity and intentAndroid App Development - 02 Activity and intent
Android App Development - 02 Activity and intentDiego Grancini
 

Mais de Diego Grancini (12)

Android App Development - 14 location, media and notifications
Android App Development - 14 location, media and notificationsAndroid App Development - 14 location, media and notifications
Android App Development - 14 location, media and notifications
 
Android App Development - 13 Broadcast receivers and app widgets
Android App Development - 13 Broadcast receivers and app widgetsAndroid App Development - 13 Broadcast receivers and app widgets
Android App Development - 13 Broadcast receivers and app widgets
 
Android App Development - 12 animations
Android App Development - 12 animationsAndroid App Development - 12 animations
Android App Development - 12 animations
 
Android App Development - 11 Lists, grids, adapters, dialogs and toasts
Android App Development - 11 Lists, grids, adapters, dialogs and toastsAndroid App Development - 11 Lists, grids, adapters, dialogs and toasts
Android App Development - 11 Lists, grids, adapters, dialogs and toasts
 
Android App Development - 10 Content providers
Android App Development - 10 Content providersAndroid App Development - 10 Content providers
Android App Development - 10 Content providers
 
Android App Development - 09 Storage
Android App Development - 09 StorageAndroid App Development - 09 Storage
Android App Development - 09 Storage
 
Android App Development - 08 Services
Android App Development - 08 ServicesAndroid App Development - 08 Services
Android App Development - 08 Services
 
Android App Development - 07 Threading
Android App Development - 07 ThreadingAndroid App Development - 07 Threading
Android App Development - 07 Threading
 
Android App Development - 06 Fragments
Android App Development - 06 FragmentsAndroid App Development - 06 Fragments
Android App Development - 06 Fragments
 
Android App Development - 05 Action bar
Android App Development - 05 Action barAndroid App Development - 05 Action bar
Android App Development - 05 Action bar
 
Android App Development - 04 Views and layouts
Android App Development - 04 Views and layoutsAndroid App Development - 04 Views and layouts
Android App Development - 04 Views and layouts
 
Android App Development - 02 Activity and intent
Android App Development - 02 Activity and intentAndroid App Development - 02 Activity and intent
Android App Development - 02 Activity and intent
 

Último

9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7Pooja Nehwal
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRnishacall1
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceanilsa9823
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceanilsa9823
 
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Niamh verma
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPsychicRuben LoveSpells
 
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...wyqazy
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Pooja Nehwal
 

Último (9)

9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
 
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
 
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
 

Android App Development - 01 Introduction

  • 2. ● Introduction ● Activity and Intent ● Resources ● Views and Layouts ● ActionBar ● Fragments ● Threading ● Services ● Storage ● Content Providers Course structure ● Lists, Grids and Adapters ● Dialogs and Toasts ● Animations ● BroadcastReceivers ● AppWidgets ● Location ● Media ● Notifications
  • 3. Android Definition: Android is a stack of Contexts Features: ● Open Source ● Based on Linux Kernel 3.x ● Runs dex-code (Dalvik Executable) ● Run on ARM and x86 architecture ● Supports OpenGL 1.1, 2.0, 3.0 ● Uses SQLite ● Handles different input types ● Location services ● Used in Smartphone, Tablet, PC, TV, Wearable, Game console... Introduction
  • 4. Versioni Android 09/03/2013 Google announces 1.000.000.000 Android devices in the world. Version distribution is based on Google Play accesses: Introduction
  • 6. Fragmentation The main platform issue to deal with is Fragmentation. ● As said, the last Android release is never the most used. You have to deal with, therefore, customers who demand the integration of new features on the new releases, but not present on previous ones. ● Devices with different display, form factor, resolution, memory, CPU, sensors, etc ... ● The trend for manufacturers is to enlarge the terminals with a ride to the higher resolution (Nexus 10: 2560x1600px) ● If all this were not enough, each new release of Android always has its teething problems. Introduction
  • 7. Android SDK Virtual Machine ● DVM (Dalvik Virtual Machine) ● ART (Android RunTime) IDE ● Android Developer Tool (Eclipse) ● Android Studio (JetBrains IntelliJ) Development tools ● DDMS (Dalvik Debug Monitor Service) ● ADB (Android Debug Gridge) ● Emulator ● Lint Introduction
  • 8. Android Documentation References to the official Android documentation are as follows: ● Design: http://developer.android.com/design/index.html ● Develop: http://developer.android.com/develop/index.html ● Training: http://developer.android.com/training/index.html ● Guides: http://developer.android.com/guide/index.html ● JavaDoc: http://developer.android.com/reference/packages.html ● Tools: http://developer.android.com/tools/index.html ● Google Services: http://developer.android.com/google/index.html ● Distribute: http://developer.android.com/distribute/index.html Introduction
  • 9. Android Application – The Structure An Android application is composed of 3 types of objects: ● AndroidManifest.xml ● Java code ● Internal resources You can use a development tool called Android NDK (Native Development Kit) to integrate native code in C and call it from Java code using native interfaces. The use of NDK is discouraged by Google, but it is necessary for some applications such as the reading of PDF files or decoding of media files. Introduction
  • 10. Android Application- Components The function blocks with which an application can interface with the system are 4: ● Activities ● Services ● Broadcast Receivers ● ContentProviders Each of these has a specific role, but no one is required to create an application. The first 2 are subclasses of Context. To notify the system of their presence and describe how they should be managed, these elements have to be declared within a xml file called AndroidManifest. Introduction
  • 11. Manifest The Manifest file is required for all Android applications. It has the purpose of: ● Declaring the package used (because this is the unique identifier of the application inside the system). ● Describing the basic components integrated in the application. ● Determining which processes should be executed components in. ● Declaring the permissions to access API, hardware, providers... ● Defining the application's compatibility with the terminal based on the version of Android, the density and size of the display. Introduction
  • 12. AndroidManifest Structure <?xml version="1.0" encoding="utf-8"?> <manifest> <uses-permission /> <permission /> <uses-sdk /> <uses-feature /> <supports-screens /> <compatible-screens /> <uses-library /> <application> <activity> <intent-filter> <action /> <category /> <data /> </intent-filter> </activity> Introduction <service> <intent-filter> </intent-filter> <meta-data /> </service> <receiver> <intent-filter> </intent-filter> <meta-data /> </receiver> <provider> <grant-uri-permission /> <meta-data /> <path-permission /> </provider> </application> </manifest>
  • 13. APK Android Package Android applications are written in the Java language. The Android SDK tools compile the code and allow you to produce an APK file: Android Package, which is an archive file with a .apk suffix. An APK file contains all the contents of an Android app and is the file that Android devices use to install the application. During installation the device copies the APK file to the internal memory selecting all the resources to adapt them to its configuration (we will see this later). An APK is always signed with a certificate: the ADT generates a debug certificate not valid for publication. Introduction
  • 14. Build The ADT has a tool to export the APK which can then be published on the Store. Once published an APK with a certificate, all subsequent updates must be signed with the same certificate, otherwise users must uninstall the application resulting in the cancellation of the entire cache and persistent data stored on the device from earlier versions. It's possible to export multiple APK for publication in defining the Manifest Destination: smartphone or tablet, Android versions, etc. This practice is discouraged due to the reduced maintainability of the code. Introduction