advertisement

Android101 - Intro and Basics

50 %
50 %
advertisement
Information about Android101 - Intro and Basics
Technology

Published on March 10, 2014

Author: jromero1214

Source: slideshare.net

Description

A quick rundown on the Android architecture and main components.
advertisement

Android 101 Part 1. Introduction, basics, and your environment

While we wait…  Android ADT Bundle  http://developer.android.com/sdk/index.ht ml  Genymotion  http://www.genymotion.com/

Prerequisites  OOP Language Experience  Computer (Mac/Linux/Windows)  Plus:  Java – programming  XML – layouts and resources  Command Line – general commands

What is Android?  Platform  The operating system  Framework  Set of APIs to develop for the platform  SDK  Set of tools (including the framework) to assist developing for the platform

Source: http://www.armdesigner.com/NewsLook617.html

Android and Google  Android is open source (AOSP)  Google is the owner/maintainer  Source: http://source.android.com  GApps  Google specific closed source apps  Google Play Store  Google Play Services  Google Maps  …

Uses for Android?  Calls  Music  Videos  Games  Social  …  Educational  Commercial (POS)  Satellite  Security  Accessory  …

Android vs iOS  Open Source  Java / XML  78.4% MS Worldwide  50.6% MS USA  $100-$200/month  800,000 apps  ~$130,000 senior dev  Closed Source  Objective-C  17.6% MS Worldwide  43.9% MS USA  $500-$1000/month  800,000 apps  ~$120,000 senior dev

Versions (OS vs API)

Components In context of our demo application

Demo Application  Features:  Displays lists of saved notes  Allows user to add and edit notes  Can record notes  Can playback notes  Stops recording or playback when a call is incoming or made

Step 1: Display We need to display a few screens to the user…

Activities  Represents a single screen extends Activity class

Fragments  Represents a section of the screen  An Activity coordinates the Fragment(s)  Fragments can be reused extends Fragment class

Step 2: Persist Data We need to persist the notes the user adds…

ContentProvider  Manages data  Can use almost any storage option  SQLite  File  Remote Server  …  Provides consistent interface (CRUD)  Can be restricted with permissions extends ContentProvider class

Step 3: Record/Play Audio We need to record or play audio while allowing for multitasking…

Services  Used to perform in the background  Service class works in main thread  IntentService (child class) works in background thread  Background = No user interface extends Service class

Step 4: Phone state We need to stop/pause audio playback or recording…

BroadcastRecievers  Listens to system-wide events  Incoming SMS  Alarm  Network State  …  Usually triggers a larger action extends BroadcastReciever class

Using the Components

AndroidManifest.xml  Declares:  Permissions used  Libraries required  Hardware required  Package name (must be unique)  Application name  Components  Activity <activity>  Service <service>  ContentProvider <provider>  BroadcastReciever <reciever>  …

Intents (options)  Component Name  The name of the component to start  Action  Examples: VIEW, EDIT, PICK  Data  Uri to the data  Examples: Image, URL, Document  Category  Examples: Browsable, Launcher  Extras  Key-value pairs of data to pass to the component  Flags  Used to tell the Android system how to launch certain components extends Intent class

IntentFilters  action  name  android.intent.action.SEND  com.example.whatever.DO_IT  data  mimeType  scheme  host  port  path  …  category  BROWSABLE  LAUNCHER  DEFAULT

Intents  Explicit Intent  Intent to start a specific component you know exists, such as from your app or a system component  new Intent(this, SecondActivity.class)  Implicit Intent  Intent to do a general action and possibly allow other applications to handle it  new Intent(Intent.ACTION_VIEW, Uri.parse(“http://google.com”)) extends Intent class

Resources A very quick glimpse

Resources  animator  anim  color  drawable  layout  menu  raw  values  arrays  colors  dimens  strings  styles  xml res/ directory

Resources (qualifiers)  Language and region  Layout direction  Smallest Width  Available Width  Available Height  Screen size  Screen Aspect  Screen Orientation  UI Mode  Screen Pixel Density  Platform Version  … res/ directory

Environment Setting it up

Environment - Java JDK  Java 7 JDK - http://goo.gl/zXjC  To confirm: … run: javac –version … output: javac 1.7.0_45

Environment - ADT Bundle  ADT Bundle - http://goo.gl/2qpr  Eclipse + ADT Plugin  Android SDK Tools  Android Platform Tools  Latest Android platform  Latest Android System image

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

‫57 شرح الـ GUI Layout الجزء الثاني ...

98 videos Play all Android101 Abdullah Almehmadi; 60 شرح ... intro | الواجهات ... Basic GUI Calculator Part 1 - Duration: ...
Read more

AMGOO Loves Android! on Pinterest | Android, Android Apps ...

... {.intro} [custom:photography ... Amgoo Loves Android ... phone-can-do-that-you-never-knew #AMGOO #Android101 ...
Read more

‫٨٠ - المصفوفات النصية وملفات XML ...

98 videos Play all Android101 Abdullah Almehmadi; Android ... Function Basics - Duration: ... Intro to Arrays Part I - Duration: ...
Read more

Charleston CODEcamp · GitHub - How people build software ...

Charleston CODEcamp. Charleston, SC; ... Developer Basics Updated Apr 19, 2016. ... android101. Updated Jan 2, 2015.
Read more

MelbJVM · GitHub

melbjvm-2014-09-javassist. forked from elruwen/melbjvm-2014-09-javassist. Samples for September 2014's MelbJVM Javassist presentation Updated Sep 9, ...
Read more

Android 101: A Guide to Using Your Android Phone | PCWorld

Android can do a lot for you-but you have to know where to begin. Compared to the iPhone's cut-and-dried interface, the Android operating system ...
Read more