Android App Development - 01 Introduction

Embed Size (px)

Citation preview

  1. 1. Introduction
  2. 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. 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. 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
  5. 5. Market Share Introduction
  6. 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. 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. 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. 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. 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. 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. 12. AndroidManifest Structure Introduction
  13. 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. 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