1 / 68

Android Application Development DevFest event 2012 @ Pear Continental, Karachi

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).

zorina
Download Presentation

Android Application Development DevFest event 2012 @ Pear Continental, Karachi

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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

  3. Me.loveQuestions==true

  4. ورفعنالک ذکرک

  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. SmartPhoneVs PC sales 2011

  8. Market Share Q2 2012

  9. Agenda Market Statistics The Android Work in Pakistan Android Basics Hello World Main Building Blocks Android Best Practices

  10. Android Apps MyomoMyProgress Sony Socom Android App Bitzer NSDroid (NetSuite CRM) Hiplink

  11. Myomo

  12. Sony Socom App

  13. BEAM(Bitzer Enterprise)

  14. NSDroid(NetSuite CRM)

  15. Hiplink

  16. Agenda Market Statistics The Android Work in Pakistan Android Basics Hello World Main Building Blocks Android Best Practices

  17. Android Stack

  18. The Stack

  19. 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

  20. 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…

  21. Question: Difference between Java VM and Dalvik VM?

  22. 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

  23. 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.

  24. Applications

  25. Applications • Dalvik Executable + Resources = APK • Must be signed (but debug key is okay for development) • Many markets with different policies

  26. Question: What is the difference between Android and Java?

  27. Android and Java Android Java = Java SE – AWT/Swing + Android API

  28. Android SDK- what is in box? SDK Tools Docs Platforms • Data • Skins • Images • Samples Add-ons • Google

  29. Agenda Market Statistics The Android Work in Pakistan Android Basics Hello World Main Building Blocks Android Best Practices

  30. Hello World-Create New Project Use the Eclipse tool to create a new Android project. Here are some key constructs:

  31. Step-1

  32. Step-2

  33. Step-3

  34. Step-4

  35. Hello World-Anatomy of App Java Code + XML / Other Resources + Manifest File = Android App

  36. 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-sdkandroid: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>

  37. HelloWorld- Layout Resource File <?xml version="1.0" encoding="utf-8"?> <LinearLayoutxmlns: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>

  38. 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); } }

  39. Agenda Market Statistics The Android Work in Pakistan Android Basics Hello World Main Building Blocks Android Best Practices

  40. Main Building Blocks Activities Intents Services Content Providers Broadcast Receivers Fragments

  41. Activities An activity represents a screen or windows

  42. Activity LifeCycle Activity have well-defined lifecycle. The android OS manages your activity by changing its state. You fill in the blanks

  43. Intents • Intents represent events or actions. • They are to Android apps what hyperlinks are to websites. Sort of. • Intents can be implicit or explicit.

  44. Services Services are code that runs in the background. They can be started and stopped. Services doesn’t have UI.

  45. 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.

  46. Content Provider • Content Providers share content with applications across application boundaries. • Examples of built-in Content Providers are: • Contacts, • MediaStore, • Settings and more.

  47. Broadcast Receivers An Intent-based publish-subscribe mechanism. Great for listening system events such as SMS messages.

  48. Fragments A Fragment represents a behavior or a portion of user interface in an Activity.

  49. 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. • DialogFragmentmakes 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.

More Related