SlideShare ist ein Scribd-Unternehmen logo
1 von 70
Android Application Development
      DevFest event 2012
  @Pear Continental, Karachi

     Presenter: Imam Raza
Speaker.bio.toString()
•     Senior Software Architect @ Folio3.
•     Specialties: Enterprise Software Architecture,
      Mobile Software Architecture, Software Best
      Practices(TDD,CI ,AOP, IOC).
•     Master in computer science from KU
•     B.E (Mechanical) from NED University


Monday, September 19, 2011
Me.loveQuestions==true



Monday, September 19, 2011
Monday, September 19, 2011
Agenda
•   Market Statistics
•   The Android Work in Pakistan
•   Android Basics
•   Hello World
•   Main Building Blocks
•   Android Best Practices
Agenda
•   Market Statistics
•   The Android Work in Pakistan
•   Android Basics
•   Hello World
•   Main Building Blocks
•   Android Best Practices
SmartPhone Vs PC sales 2011
Category           Q4 2011      Growth        Full year 2011   Growth
                   shipments    Q4’11/Q4’10   shipments        2011/2010
                   (millions)                 (millions)
Smart Phones       158.5        56.6%         487.7            62.7%

Total Client Pcs   120.2        16.3%         414.6            14.8%

-pads              26.5         186.2%        63.2             274.2%

-netbooks          6.7          -32.4%        29.4             -25.3%

-notebooks         57.9         7.3%          209.6            7.5%

-Desktops          29.1         -3.6%         112.4            2.3%
Market Share Q2 2012
Smart Phone   %percentage   Unit sold (millions)

Android       68.1%         104.8

iOS           16.9%         26

Black Berry   4.8%          7.4

Symbian       4.4%          6.8

Windows       3.5%          5.4
Agenda
Market Statistics
The Android Work in Pakistan
Android Basics
Hello World
Main Building Blocks
Android Best Practices
Android Apps
•   Myomo MyProgress
•   Sony Socom Android App
•   Bitzer
•   NSDroid (NetSuite CRM)
•   Hiplink
Myomo
Sony Socom App
BEAM(Bitzer Enterprise)
NSDroid(NetSuite CRM)
Hiplink
Agenda
Market Statistics
The Android Work in Pakistan
Android Basics
Hello World
Main Building Blocks
Android Best Practices
Android Stack
The Stack
Linux Kernel
•   Android runs on Linux. Linux
    provides:
        –     Hardware abstraction
             layer
        –    Memory
             management
        –    Process management
        –    Networking
•   Users never see Linux sub
    system
•   The adb shell command opens
    Linux shell
Native Libraries
•   Pieces borrowed from other
    open source projects:
        –    Bionic, a super fast and
             small license-friendly
             libc library optimized
             for Android
•   WebKit library for fast HTML
    rendering
•   OpenGL for graphics
•   Media codecs offer support for
    major audio/video codecs
•   SQLite database ..Much more…
Question: Difference between
Java VM and Dalvik VM?
Dalvik VM
•   Dalvik VM is Android implementation of Java VM
•   Dalvik is optimized for mobile devices:
       –    Battery consumption
       –    CPU capabilities
•   Key Dalvik differences:
       –   Register-based versus stack-based VM
       –   Dalvik runs .dex files
       –   More efficient and compact implementation
       –   Different set of Java libraries than JDK
Application Framework
•   The rich set of system services wrapped in an
    intuitive Java API.
•   This ecosystem that developers can easily tap
    into is what makes writing apps for Android easy.
•   Location, web, telephony, WiFi, Bluetooth,
    notifications, media, camera, just to name a few.
Applications
Applications

• Dalvik Executable +
  Resources = APK
• Must be signed (but
  debug key is okay
for development)
• Many markets with
  different policies
Question: What is the
difference between Android
and Java?
Android and Java
Android Java
=
Java SE
–
AWT/Swing
+
Android API
Android SDK- what is in box?
SDK
Tools
Docs
Platforms
          –   Data
          –   Skins
          –   Images
          –   Samples
Add-ons
          –   Google
Agenda
Market Statistics
The Android Work in Pakistan
Android Basics
Hello World
Main Building Blocks
Android Best Practices
Hello World-Create New
Project
Use the Eclipse tool to create a new Android
  project.
Here are some key constructs:
Step-1
Step-2
Step-3
Step-4
Hello World-Anatomy of App
Java Code
+
XML / Other
Resources
+
Manifest File
=
Android App
HelloWorld-Manifest File
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.folio3"
  android:versionCode="1"
  android:versionName="1.0">
 <uses-sdk android:minSdkVersion="10" />
 <application android:icon="@drawable/icon" android:label="@string/app_name">
   <activity android:name=".HelloworldActivity"
        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>
HelloWorld- Layout Resource
File
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:orientation="vertical"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 >
<TextView
 android:layout_width="fill_parent"
 android:layout_height="wrap_content"
 android:text="@string/hello"
 />
</LinearLayout>
HelloWorld-JAVA File
package com.folio3;
import android.app.Activity;
import android.os.Bundle;
public class HelloAndroid extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}
Agenda
Market Statistics
The Android Work in Pakistan
Android Basics
Hello World
Main Building Blocks
Android Best Practices
Main Building Blocks
•   Activities
•   Intents
•   Services
•   Content Providers
•   Broadcast Receivers
•   Fragments
Activities
An activity represents a screen
or windows
Activity LifeCycle
Activity have well-defined
lifecycle. The android OS
manages your activity by
changing its state.
You fill in the blanks
Intents
• Intents represent
  events or actions.
• They are to Android
  apps what hyperlinks
  are to websites. Sort
  of.
• Intents can be
implicit or explicit.
Services
Services are code that runs in the background.
  They can be started and stopped. Services
  doesn’t have UI.
Service LifeCycle
•   Service also has a lifecycle,
    but it’s much simpler than
    activity’s.
•   An activity typically starts
    and stops a service to do
    some work for it in the
    background, such as play
    music, check for new
    tweets, etc.
Content Provider
•   Content Providers share
content with applications
across application
boundaries.
•   Examples of built-in
Content Providers are:
        –  Contacts,
        –  MediaStore,
        –  Settings and
           more.
Broadcast Receivers
An Intent-based publish-subscribe mechanism.
 Great for listening system events such as SMS
 messages.
Fragments
A Fragment represents a behavior or a portion of
user interface in an Activity.
Fragments
• Fragments were introduced in Android 3.0 (API
  level 11), primarily to support more dynamic and
  flexible UI designs on large screens, such as
  tablets.
• Fragments are lot like an activity but it must
  exists within the activity.
• DialogFragment makes it easy to show a Dialog
  that is managed as part of the Activity lifecycle.
• ListFragment makes it easy to show a list of data.
Monday, September 19, 2011
Monday, September 19, 2011
Agenda
Market Statistics
The Android Work in Pakistan
Android Basics
Hello World
Main Building Blocks
Android Best Practices
Best Practices
• Use RoboGuice(DI based framework)
• Learn Activity Life Cycle
• Avoid getting activities thick
• Design views for multiple size/orientation.
• Use Fragments to better manage sub-portion of
  Activity.
• Practice Good MVC.
• Use Source Code Analyzer Tools (findbugs,
  checkstyle,PMD and CPD). Integrate these tools
  with CI Tools like Teamcity.
Monday, September 19, 2011
RoboGuice
• It’s based on dependency injection pattern just
  like Spring Framework in enterprise apps
• It takes the guesswork out of development. e.g
  checking null for getIntent().getExtras(). Casting
  findViewById().
• Make your writing unit test case easy
• It reduces your lines of code and hence the
  number of bugs see next slide for code.

Monday, September 19, 2011
class AndroidWay extends Activity {
      TextView name;
      ImageView thumbnail;
      LocationManager loc;
      Drawable icon;
      String myName;

      public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        name = (TextView) findViewById(R.id.name);
        thumbnail = (ImageView) findViewById(R.id.thumbnail);
        loc = (LocationManager)
    getSystemService(Activity.LOCATION_SERVICE);
        icon = getResources().getDrawable(R.drawable.icon);
        myName = getString(R.string.app_name);
            name.setText( "Hello, " + myName );
        }
    }
Monday, September 19, 2011
class RoboWay extends RoboActivity {
     @InjectView(R.id.name)       TextView name;
     @InjectView(R.id.thumbnail)    ImageView thumbnail;
     @InjectResource(R.drawable.icon) Drawable icon;
     @InjectResource(R.string.app_name) String myName;
     @Inject             LocationManager loc;

        public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
            name.setText( "Hello, " + myName );
        }
    }
Monday, September 19, 2011
Compatibility
• Ability to install and run app on device.
• Huge variety of devices so developer need to
  make sure about the Hardware/Software feature
  his application needed to run.




Monday, September 19, 2011
Compatibility
• Specify uses-feature node for every API you use
• Mark essential features as required.
• Mark optional features as not required.
<uses-feature
Android:name=“android.hardware.gps”
Android:required=“true”/>


Monday, September 19, 2011
Compatibility
• Check for API existence in code.
PackageManager pm = getPackageManager();
Boolean hasCompass=
    pm.hasSystemFeature(
PackageManager.FEATURE_SENSOR_COMPASS);
If(hasCompass){
//enable things are needed
}

Monday, September 19, 2011
Compatibility
Use dp and sp instead of px:
<Button android:layout_width=“wrap_content”
  Android:layout_height=“wrap_content”
  Android:layout_marginTop=“20dp”/>
<TextView android:layout_width=“match_parent”
  Android:layout_height=“wrap_content”
  Android:textsize=“20sp”/>
Monday, September 19, 2011
Compatibility




Monday, September 19, 2011
Compatibility-Test for different
device/screen size




 Monday, September 19, 2011
Compatibility-Test for different
device/screen size




 Monday, September 19, 2011
Advance Task Killer App is
       among 50 millions or more
             install apps
                             Why?


Monday, September 19, 2011
Performance
• Avoid creating objects. (e.g use StringBuffer) .
• Prefer static over virtual.
• Use static final for constants.
• Avoid internal getter/Setter (with Proguard you
  don’t need it.)
• Use Enhanced For Loop Syntax e.g:
     for (Foo a : mArray) { sum += a.mSplat; }
• Use native methods.
• Avoid using Float and enums
Responsiveness




Monday, September 19, 2011
Responsiveness
• “Application Not Responding”
     •     Respond to user within 5 seconds
     •     Broadcast Receiver must complete within 10 seconds
• Use Threads and AsyncTasks within Services




Monday, September 19, 2011
Source Code Analyzer Tools
•     FindBugs
•     PMD
•     CheckStyle
•     CPD : Shows code duplication
•     You can integrate them with CI Server like
      Teamcity to get consolidated reports of code
      quality of your team. We have been using it on
      our company and its really helped us in
      monitoring quality of code.
Monday, September 19, 2011
Monday, September 19, 2011
Questions

Weitere ähnliche Inhalte

Was ist angesagt?

Build Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponentsBuild Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponentsGil Fink
 
Polymer - Welcome to the Future @ PyGrunn 08/07/2014
Polymer - Welcome to the Future @ PyGrunn 08/07/2014Polymer - Welcome to the Future @ PyGrunn 08/07/2014
Polymer - Welcome to the Future @ PyGrunn 08/07/2014Spyros Ioakeimidis
 
Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)jskvara
 
Polymer / WebComponents
Polymer / WebComponentsPolymer / WebComponents
Polymer / WebComponentsArnaud Kervern
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web ComponentsRich Bradshaw
 
Web Components Everywhere
Web Components EverywhereWeb Components Everywhere
Web Components EverywhereIlia Idakiev
 
Polymer, A Web Component Polyfill Library
Polymer, A Web Component Polyfill LibraryPolymer, A Web Component Polyfill Library
Polymer, A Web Component Polyfill Librarynaohito maeda
 
Polymer presentation in Google HQ
Polymer presentation in Google HQPolymer presentation in Google HQ
Polymer presentation in Google HQHarshit Pandey
 
Web Components + Backbone: a Game-Changing Combination
Web Components + Backbone: a Game-Changing CombinationWeb Components + Backbone: a Game-Changing Combination
Web Components + Backbone: a Game-Changing CombinationAndrew Rota
 
Levent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & PolymerLevent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & PolymerErik Isaksen
 
Web components
Web componentsWeb components
Web componentsGil Fink
 
Web Components with Polymer (extra Polymer 2.0)
Web Components with Polymer (extra Polymer 2.0)Web Components with Polymer (extra Polymer 2.0)
Web Components with Polymer (extra Polymer 2.0)Dhyego Fernando
 
A brave new web - A talk about Web Components
A brave new web - A talk about Web ComponentsA brave new web - A talk about Web Components
A brave new web - A talk about Web ComponentsMichiel De Mey
 
Web Components
Web ComponentsWeb Components
Web ComponentsFITC
 

Was ist angesagt? (20)

Booting up with polymer
Booting up with polymerBooting up with polymer
Booting up with polymer
 
Booting up with polymer
Booting up with polymerBooting up with polymer
Booting up with polymer
 
Build Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponentsBuild Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponents
 
Polymer - Welcome to the Future @ PyGrunn 08/07/2014
Polymer - Welcome to the Future @ PyGrunn 08/07/2014Polymer - Welcome to the Future @ PyGrunn 08/07/2014
Polymer - Welcome to the Future @ PyGrunn 08/07/2014
 
Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)
 
Polymer / WebComponents
Polymer / WebComponentsPolymer / WebComponents
Polymer / WebComponents
 
Web Components
Web ComponentsWeb Components
Web Components
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web Components
 
Web Components Everywhere
Web Components EverywhereWeb Components Everywhere
Web Components Everywhere
 
Google Polymer Framework
Google Polymer FrameworkGoogle Polymer Framework
Google Polymer Framework
 
Polymer, A Web Component Polyfill Library
Polymer, A Web Component Polyfill LibraryPolymer, A Web Component Polyfill Library
Polymer, A Web Component Polyfill Library
 
Polymer
PolymerPolymer
Polymer
 
Polymer presentation in Google HQ
Polymer presentation in Google HQPolymer presentation in Google HQ
Polymer presentation in Google HQ
 
Web Components + Backbone: a Game-Changing Combination
Web Components + Backbone: a Game-Changing CombinationWeb Components + Backbone: a Game-Changing Combination
Web Components + Backbone: a Game-Changing Combination
 
Levent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & PolymerLevent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & Polymer
 
Introduction to polymer project
Introduction to polymer projectIntroduction to polymer project
Introduction to polymer project
 
Web components
Web componentsWeb components
Web components
 
Web Components with Polymer (extra Polymer 2.0)
Web Components with Polymer (extra Polymer 2.0)Web Components with Polymer (extra Polymer 2.0)
Web Components with Polymer (extra Polymer 2.0)
 
A brave new web - A talk about Web Components
A brave new web - A talk about Web ComponentsA brave new web - A talk about Web Components
A brave new web - A talk about Web Components
 
Web Components
Web ComponentsWeb Components
Web Components
 

Andere mochten auch

Microservices y la era Post Industrial de la Web
Microservices y la era Post Industrial de la WebMicroservices y la era Post Industrial de la Web
Microservices y la era Post Industrial de la WebRoberto Allende
 
Reaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and PolymerReaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and PolymerFITC
 
Android presentation
Android presentationAndroid presentation
Android presentationImam Raza
 
Web components the future is here
Web components   the future is hereWeb components   the future is here
Web components the future is hereGil Fink
 
GDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android NGDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android NImam Raza
 
Apple WWDC 2014 highlights
Apple WWDC 2014 highlightsApple WWDC 2014 highlights
Apple WWDC 2014 highlightsImam Raza
 
O'Reilly Fluent, Web Components Enterprise
O'Reilly Fluent, Web Components EnterpriseO'Reilly Fluent, Web Components Enterprise
O'Reilly Fluent, Web Components EnterpriseMediaMath
 
Material design
Material designMaterial design
Material designImam Raza
 
Big Data University ML0101EN Certificate _ Big Data University
Big Data University ML0101EN Certificate _ Big Data UniversityBig Data University ML0101EN Certificate _ Big Data University
Big Data University ML0101EN Certificate _ Big Data UniversityImam Raza
 
Information and communication technology consultancy
Information and communication technology consultancyInformation and communication technology consultancy
Information and communication technology consultancyBrijesh Rawat
 
Audio technik Profile
Audio technik  ProfileAudio technik  Profile
Audio technik ProfileAudio Technik
 
Audio video technology consultancy services
Audio video technology consultancy servicesAudio video technology consultancy services
Audio video technology consultancy servicesAvtcs India
 
Introductions and Protfolio
Introductions and ProtfolioIntroductions and Protfolio
Introductions and ProtfolioBrijesh Rawat
 
Globalizing Music-Audio Sales - NAMM 2015 H.O.T. Zone Presentation by Marek M...
Globalizing Music-Audio Sales - NAMM 2015 H.O.T. Zone Presentation by Marek M...Globalizing Music-Audio Sales - NAMM 2015 H.O.T. Zone Presentation by Marek M...
Globalizing Music-Audio Sales - NAMM 2015 H.O.T. Zone Presentation by Marek M...Marek Makosiej
 
MBaaS (Mobile Backend As a Service)
MBaaS (Mobile Backend As a Service)MBaaS (Mobile Backend As a Service)
MBaaS (Mobile Backend As a Service)Imam Raza
 
Consultancy project ricardo siller execution
Consultancy project ricardo siller   executionConsultancy project ricardo siller   execution
Consultancy project ricardo siller executionRicardo Siller Cárdenas
 

Andere mochten auch (20)

Microservices y la era Post Industrial de la Web
Microservices y la era Post Industrial de la WebMicroservices y la era Post Industrial de la Web
Microservices y la era Post Industrial de la Web
 
Reaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and PolymerReaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and Polymer
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Web components the future is here
Web components   the future is hereWeb components   the future is here
Web components the future is here
 
GDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android NGDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android N
 
Apple WWDC 2014 highlights
Apple WWDC 2014 highlightsApple WWDC 2014 highlights
Apple WWDC 2014 highlights
 
O'Reilly Fluent, Web Components Enterprise
O'Reilly Fluent, Web Components EnterpriseO'Reilly Fluent, Web Components Enterprise
O'Reilly Fluent, Web Components Enterprise
 
Material design
Material designMaterial design
Material design
 
Big Data University ML0101EN Certificate _ Big Data University
Big Data University ML0101EN Certificate _ Big Data UniversityBig Data University ML0101EN Certificate _ Big Data University
Big Data University ML0101EN Certificate _ Big Data University
 
HTML5 Web Components
HTML5 Web ComponentsHTML5 Web Components
HTML5 Web Components
 
IT consultancy presentation
IT consultancy presentationIT consultancy presentation
IT consultancy presentation
 
Information and communication technology consultancy
Information and communication technology consultancyInformation and communication technology consultancy
Information and communication technology consultancy
 
Audio technik Profile
Audio technik  ProfileAudio technik  Profile
Audio technik Profile
 
Cygnet Consultancy Power Point
Cygnet Consultancy Power PointCygnet Consultancy Power Point
Cygnet Consultancy Power Point
 
Audio video technology consultancy services
Audio video technology consultancy servicesAudio video technology consultancy services
Audio video technology consultancy services
 
Introductions and Protfolio
Introductions and ProtfolioIntroductions and Protfolio
Introductions and Protfolio
 
Globalizing Music-Audio Sales - NAMM 2015 H.O.T. Zone Presentation by Marek M...
Globalizing Music-Audio Sales - NAMM 2015 H.O.T. Zone Presentation by Marek M...Globalizing Music-Audio Sales - NAMM 2015 H.O.T. Zone Presentation by Marek M...
Globalizing Music-Audio Sales - NAMM 2015 H.O.T. Zone Presentation by Marek M...
 
MBaaS (Mobile Backend As a Service)
MBaaS (Mobile Backend As a Service)MBaaS (Mobile Backend As a Service)
MBaaS (Mobile Backend As a Service)
 
AudioTechnik
AudioTechnikAudioTechnik
AudioTechnik
 
Consultancy project ricardo siller execution
Consultancy project ricardo siller   executionConsultancy project ricardo siller   execution
Consultancy project ricardo siller execution
 

Ähnlich wie Google Developer Group(GDG) DevFest Event 2012 Android talk

Introduction to android mobile app development.pptx
Introduction to android mobile app development.pptxIntroduction to android mobile app development.pptx
Introduction to android mobile app development.pptxridzah12
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21dxsaki
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app developmentAbhishekKumar4779
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_authlzongren
 
Mobile application development
Mobile application developmentMobile application development
Mobile application developmentumesh patil
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentCan Elmas
 
Android complete basic Guide
Android complete basic GuideAndroid complete basic Guide
Android complete basic GuideAKASH SINGH
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionDuckMa
 
Android application development
Android application developmentAndroid application development
Android application developmentLinh Vi Tường
 
Introduction to Android- A session by Sagar Das
Introduction to Android-  A session by Sagar DasIntroduction to Android-  A session by Sagar Das
Introduction to Android- A session by Sagar Dasdscfetju
 
Android Workshop Presentation
Android Workshop PresentationAndroid Workshop Presentation
Android Workshop PresentationNAILBITER
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkTroy Miles
 
Phonebook Directory or Address Book In Android
Phonebook Directory or Address Book In AndroidPhonebook Directory or Address Book In Android
Phonebook Directory or Address Book In AndroidABHISHEK DINKAR
 
Basics of Android
Basics of Android Basics of Android
Basics of Android sabi_123
 

Ähnlich wie Google Developer Group(GDG) DevFest Event 2012 Android talk (20)

Introduction to android mobile app development.pptx
Introduction to android mobile app development.pptxIntroduction to android mobile app development.pptx
Introduction to android mobile app development.pptx
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21
 
Android development first steps
Android development   first stepsAndroid development   first steps
Android development first steps
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Project
ProjectProject
Project
 
Mobile application development
Mobile application developmentMobile application development
Mobile application development
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Android complete basic Guide
Android complete basic GuideAndroid complete basic Guide
Android complete basic Guide
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android class provider in mumbai
Android class provider in mumbaiAndroid class provider in mumbai
Android class provider in mumbai
 
Android quick talk
Android quick talkAndroid quick talk
Android quick talk
 
Intro to android (gdays)
Intro to android (gdays)Intro to android (gdays)
Intro to android (gdays)
 
Introduction to Android.ppt
Introduction to Android.pptIntroduction to Android.ppt
Introduction to Android.ppt
 
Introduction to Android- A session by Sagar Das
Introduction to Android-  A session by Sagar DasIntroduction to Android-  A session by Sagar Das
Introduction to Android- A session by Sagar Das
 
Android Workshop Presentation
Android Workshop PresentationAndroid Workshop Presentation
Android Workshop Presentation
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic Framework
 
Phonebook Directory or Address Book In Android
Phonebook Directory or Address Book In AndroidPhonebook Directory or Address Book In Android
Phonebook Directory or Address Book In Android
 
Basics of Android
Basics of Android Basics of Android
Basics of Android
 

Kürzlich hochgeladen

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 

Kürzlich hochgeladen (20)

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
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
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 

Google Developer Group(GDG) DevFest Event 2012 Android talk

  • 1. Android Application Development DevFest event 2012 @Pear Continental, Karachi Presenter: Imam Raza
  • 2. Speaker.bio.toString() • Senior Software Architect @ Folio3. • Specialties: Enterprise Software Architecture, Mobile Software Architecture, Software Best Practices(TDD,CI ,AOP, IOC). • Master in computer science from KU • B.E (Mechanical) from NED University Monday, September 19, 2011
  • 5. Agenda • Market Statistics • The Android Work in Pakistan • Android Basics • Hello World • Main Building Blocks • Android Best Practices
  • 6. Agenda • Market Statistics • The Android Work in Pakistan • Android Basics • Hello World • Main Building Blocks • Android Best Practices
  • 7. SmartPhone Vs PC sales 2011 Category Q4 2011 Growth Full year 2011 Growth shipments Q4’11/Q4’10 shipments 2011/2010 (millions) (millions) Smart Phones 158.5 56.6% 487.7 62.7% Total Client Pcs 120.2 16.3% 414.6 14.8% -pads 26.5 186.2% 63.2 274.2% -netbooks 6.7 -32.4% 29.4 -25.3% -notebooks 57.9 7.3% 209.6 7.5% -Desktops 29.1 -3.6% 112.4 2.3%
  • 8. Market Share Q2 2012 Smart Phone %percentage Unit sold (millions) Android 68.1% 104.8 iOS 16.9% 26 Black Berry 4.8% 7.4 Symbian 4.4% 6.8 Windows 3.5% 5.4
  • 9. Agenda Market Statistics The Android Work in Pakistan Android Basics Hello World Main Building Blocks Android Best Practices
  • 10. Android Apps • Myomo MyProgress • Sony Socom Android App • Bitzer • NSDroid (NetSuite CRM) • Hiplink
  • 11. Myomo
  • 12.
  • 17. Agenda Market Statistics The Android Work in Pakistan Android Basics Hello World Main Building Blocks Android Best Practices
  • 20. Linux Kernel • Android runs on Linux. Linux provides: – Hardware abstraction layer – Memory management – Process management – Networking • Users never see Linux sub system • The adb shell command opens Linux shell
  • 21. Native Libraries • Pieces borrowed from other open source projects: – Bionic, a super fast and small license-friendly libc library optimized for Android • WebKit library for fast HTML rendering • OpenGL for graphics • Media codecs offer support for major audio/video codecs • SQLite database ..Much more…
  • 23. Dalvik VM • Dalvik VM is Android implementation of Java VM • Dalvik is optimized for mobile devices: –  Battery consumption –  CPU capabilities • Key Dalvik differences: – Register-based versus stack-based VM – Dalvik runs .dex files – More efficient and compact implementation – Different set of Java libraries than JDK
  • 24. Application Framework • The rich set of system services wrapped in an intuitive Java API. • This ecosystem that developers can easily tap into is what makes writing apps for Android easy. • Location, web, telephony, WiFi, Bluetooth, notifications, media, camera, just to name a few.
  • 26. Applications • Dalvik Executable + Resources = APK • Must be signed (but debug key is okay for development) • Many markets with different policies
  • 27. Question: What is the difference between Android and Java?
  • 28. Android and Java Android Java = Java SE – AWT/Swing + Android API
  • 29. Android SDK- what is in box? SDK Tools Docs Platforms – Data – Skins – Images – Samples Add-ons – Google
  • 30. Agenda Market Statistics The Android Work in Pakistan Android Basics Hello World Main Building Blocks Android Best Practices
  • 31. Hello World-Create New Project Use the Eclipse tool to create a new Android project. Here are some key constructs:
  • 36. Hello World-Anatomy of App Java Code + XML / Other Resources + Manifest File = Android App
  • 37. HelloWorld-Manifest File <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.folio3" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="10" /> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".HelloworldActivity" 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>
  • 38. HelloWorld- Layout Resource File <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> </LinearLayout>
  • 39. HelloWorld-JAVA File package com.folio3; import android.app.Activity; import android.os.Bundle; public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } }
  • 40. Agenda Market Statistics The Android Work in Pakistan Android Basics Hello World Main Building Blocks Android Best Practices
  • 41. Main Building Blocks • Activities • Intents • Services • Content Providers • Broadcast Receivers • Fragments
  • 42. Activities An activity represents a screen or windows
  • 43. Activity LifeCycle Activity have well-defined lifecycle. The android OS manages your activity by changing its state. You fill in the blanks
  • 44. Intents • Intents represent events or actions. • They are to Android apps what hyperlinks are to websites. Sort of. • Intents can be implicit or explicit.
  • 45. Services Services are code that runs in the background. They can be started and stopped. Services doesn’t have UI.
  • 46. Service LifeCycle • Service also has a lifecycle, but it’s much simpler than activity’s. • An activity typically starts and stops a service to do some work for it in the background, such as play music, check for new tweets, etc.
  • 47. Content Provider • Content Providers share content with applications across application boundaries. • Examples of built-in Content Providers are: – Contacts, – MediaStore, – Settings and more.
  • 48. Broadcast Receivers An Intent-based publish-subscribe mechanism. Great for listening system events such as SMS messages.
  • 49. Fragments A Fragment represents a behavior or a portion of user interface in an Activity.
  • 50. Fragments • Fragments were introduced in Android 3.0 (API level 11), primarily to support more dynamic and flexible UI designs on large screens, such as tablets. • Fragments are lot like an activity but it must exists within the activity. • DialogFragment makes it easy to show a Dialog that is managed as part of the Activity lifecycle. • ListFragment makes it easy to show a list of data. Monday, September 19, 2011
  • 52. Agenda Market Statistics The Android Work in Pakistan Android Basics Hello World Main Building Blocks Android Best Practices
  • 53. Best Practices • Use RoboGuice(DI based framework) • Learn Activity Life Cycle • Avoid getting activities thick • Design views for multiple size/orientation. • Use Fragments to better manage sub-portion of Activity. • Practice Good MVC. • Use Source Code Analyzer Tools (findbugs, checkstyle,PMD and CPD). Integrate these tools with CI Tools like Teamcity. Monday, September 19, 2011
  • 54. RoboGuice • It’s based on dependency injection pattern just like Spring Framework in enterprise apps • It takes the guesswork out of development. e.g checking null for getIntent().getExtras(). Casting findViewById(). • Make your writing unit test case easy • It reduces your lines of code and hence the number of bugs see next slide for code. Monday, September 19, 2011
  • 55. class AndroidWay extends Activity { TextView name; ImageView thumbnail; LocationManager loc; Drawable icon; String myName; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); name = (TextView) findViewById(R.id.name); thumbnail = (ImageView) findViewById(R.id.thumbnail); loc = (LocationManager) getSystemService(Activity.LOCATION_SERVICE); icon = getResources().getDrawable(R.drawable.icon); myName = getString(R.string.app_name); name.setText( "Hello, " + myName ); } } Monday, September 19, 2011
  • 56. class RoboWay extends RoboActivity { @InjectView(R.id.name) TextView name; @InjectView(R.id.thumbnail) ImageView thumbnail; @InjectResource(R.drawable.icon) Drawable icon; @InjectResource(R.string.app_name) String myName; @Inject LocationManager loc; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); name.setText( "Hello, " + myName ); } } Monday, September 19, 2011
  • 57. Compatibility • Ability to install and run app on device. • Huge variety of devices so developer need to make sure about the Hardware/Software feature his application needed to run. Monday, September 19, 2011
  • 58. Compatibility • Specify uses-feature node for every API you use • Mark essential features as required. • Mark optional features as not required. <uses-feature Android:name=“android.hardware.gps” Android:required=“true”/> Monday, September 19, 2011
  • 59. Compatibility • Check for API existence in code. PackageManager pm = getPackageManager(); Boolean hasCompass= pm.hasSystemFeature( PackageManager.FEATURE_SENSOR_COMPASS); If(hasCompass){ //enable things are needed } Monday, September 19, 2011
  • 60. Compatibility Use dp and sp instead of px: <Button android:layout_width=“wrap_content” Android:layout_height=“wrap_content” Android:layout_marginTop=“20dp”/> <TextView android:layout_width=“match_parent” Android:layout_height=“wrap_content” Android:textsize=“20sp”/> Monday, September 19, 2011
  • 62. Compatibility-Test for different device/screen size Monday, September 19, 2011
  • 63. Compatibility-Test for different device/screen size Monday, September 19, 2011
  • 64. Advance Task Killer App is among 50 millions or more install apps Why? Monday, September 19, 2011
  • 65. Performance • Avoid creating objects. (e.g use StringBuffer) . • Prefer static over virtual. • Use static final for constants. • Avoid internal getter/Setter (with Proguard you don’t need it.) • Use Enhanced For Loop Syntax e.g: for (Foo a : mArray) { sum += a.mSplat; } • Use native methods. • Avoid using Float and enums
  • 67. Responsiveness • “Application Not Responding” • Respond to user within 5 seconds • Broadcast Receiver must complete within 10 seconds • Use Threads and AsyncTasks within Services Monday, September 19, 2011
  • 68. Source Code Analyzer Tools • FindBugs • PMD • CheckStyle • CPD : Shows code duplication • You can integrate them with CI Server like Teamcity to get consolidated reports of code quality of your team. We have been using it on our company and its really helped us in monitoring quality of code. Monday, September 19, 2011

Hinweis der Redaktion

  1. -First I would like to thank the organizers of the event that they allow me to put this slide as right of freedom of speech of every individual.-I condemn blasphemy act made recently by individuals and organizations in the name of freedom of speech that hurt millions of humans. So I would like to record my statement of condemnation to all those individual and organization who involved in this. And I would say to one sentence to them “Shame on you. Shame on you Google. Shame on you Facebook. Shame on you all on this wicked act”.-After recording my condemnation I would like to address you as your Muslim brother that lets we all start attaching ourselves with the only great personality ever sent to human kind. I would like share some Iqbal thoughts on the importance for Muslims to attached themselves with our Prophet Rasool Allah Sallahwasallam.SurahAle-Imran chapter#3,verse 64Allah did confer a great favour on the believers when He sent among them an apostle from among themselves, rehearsing unto them the Signs of Allah, sanctifying them, and instructing them in Scripture and Wisdom, while, before that, they had been in manifest error.
  2. Compatibitltyhttp://developer.android.com/guide/practices/compatibility.htmlSupporting Multiple Screens- http://developer.android.com/guide/practices/screens_support.html
  3. Compatibitltyhttp://developer.android.com/guide/practices/compatibility.htmlSupporting Multiple Screens- http://developer.android.com/guide/practices/screens_support.html
  4. http://developer.android.com/training/articles/perf-tips.html