Android presentation


Published on

Published in: Technology, Education
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Android presentation

  1. 1. Android Application Development GTUG Folio3 join event @PAF-KIET Presenter: Imam Raza
  2. 2. Agenda <ul><li>Folio3 Android products </li></ul><ul><li>The Android Stack </li></ul><ul><li>Hello World! </li></ul><ul><li>Main Building Blocks </li></ul>
  3. 3. Folio3 Android Apps
  4. 4. Folio3 Android Apps <ul><li>Myomo MyProgress </li></ul><ul><li>Sony Socom Android App </li></ul><ul><li>Bitzer </li></ul><ul><li>NSDroid </li></ul><ul><li>Citypedia </li></ul>
  5. 5. Myomo (company intro) <ul><li>Myomo® is a new generation medical device company that has combined innovative robotics technology with leading rehabilitation expertise to revolutionize stroke therapy. </li></ul><ul><li>Myomo's neuro-robotic platform technology is the foundation for development of new Myomo products and expanded indications. </li></ul>
  6. 6. Myomo MyProgress App <ul><li>MyProgress App is the next generation software for controlling and configuring the Myomo’s neuro-robotic hardware via bluetooth. </li></ul><ul><li>It communicates with neuro-robotic hardware via bluetooth. </li></ul><ul><li>Perform live monitoring for data generated by hardware. </li></ul><ul><li>Pull out different kinds of performance reports </li></ul>
  7. 12. Sony Socom App
  8. 13. Android Stack
  9. 14. The Stack
  10. 15. Linux Kernel <ul><li>Android runs on Linux. </li></ul><ul><li>Linux provides: </li></ul><ul><ul><li>Hardware abstraction layer </li></ul></ul><ul><ul><li>Memory management </li></ul></ul><ul><ul><li>Process management </li></ul></ul><ul><ul><li>Networking </li></ul></ul><ul><li>Users never see Linux sub system </li></ul><ul><li>The adb shell command opens Linux shell </li></ul>
  11. 16. Native Libraries <ul><li>Pieces borrowed from other open source projects: </li></ul><ul><ul><li>Bionic, a super fast and small license-friendly libc library optimized for Android </li></ul></ul><ul><li>WebKit library for fast HTML rendering </li></ul><ul><li>OpenGL for graphics </li></ul><ul><li>Media codecs offer support for major audio/video codecs </li></ul><ul><li>SQLite database </li></ul><ul><li>Much more… </li></ul>
  12. 17. Dalvik VM <ul><li>Dalvik VM is Android implementation of Java VM </li></ul><ul><li>Dalvik is optimized for mobile devices: </li></ul><ul><ul><li>  Battery consumption </li></ul></ul><ul><ul><li>  CPU capabilities </li></ul></ul><ul><li>Key Dalvik differences: </li></ul><ul><ul><li>Register-based versus stack-based VM </li></ul></ul><ul><ul><li>Dalvik runs .dex files </li></ul></ul><ul><ul><li>More efficient and compact implementation </li></ul></ul><ul><ul><li>Different set of Java libraries than JDK </li></ul></ul>
  13. 18. Application Framework <ul><li>The rich set of system services wrapped in an intuitive Java API. </li></ul><ul><li>This ecosystem that developers can easily tap into is what makes writing apps for Android easy. </li></ul><ul><li>Location, web, telephony, WiFi, Bluetooth, notifications, media, camera, just to name a few. </li></ul>
  14. 19. Applications
  15. 20. Applications <ul><li>Dalvik Executable + Resources = APK </li></ul><ul><li>Must be signed (but debug key is okay </li></ul><ul><li>for development) </li></ul><ul><li>Many markets with different policies </li></ul>
  16. 21. Android and Java <ul><li>Android Java </li></ul><ul><li>= </li></ul><ul><li>Java SE </li></ul><ul><li>– </li></ul><ul><li>AWT/Swing </li></ul><ul><li>+ </li></ul><ul><li>Android API </li></ul>
  17. 22. Android SDK- what is in box? <ul><li>SDK </li></ul><ul><li>Tools </li></ul><ul><li>Docs </li></ul><ul><li>Platforms </li></ul><ul><ul><li>Data </li></ul></ul><ul><ul><li>Skins </li></ul></ul><ul><ul><li>Images </li></ul></ul><ul><ul><li>Samples </li></ul></ul><ul><li>Add-ons </li></ul><ul><ul><li>Google </li></ul></ul>
  18. 23. HelloWorld!
  19. 24. Hello World-Create New Project <ul><li>Use the Eclipse tool to create a new Android project. </li></ul><ul><li>Here are some key constructs: </li></ul>
  20. 25. Hello World- Create New Project
  21. 26. Hello World-Anatomy of App <ul><li>Java Code </li></ul><ul><li>+ </li></ul><ul><li>XML / Other </li></ul><ul><li>Resources </li></ul><ul><li>+ </li></ul><ul><li>Manifest File </li></ul><ul><li>= </li></ul><ul><li>Android App </li></ul>
  22. 27. HelloWorld-Manifest File <ul><li><?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> </li></ul><ul><li><manifest xmlns:android=&quot;; </li></ul><ul><li>package=&quot;com.folio3&quot; </li></ul><ul><li>android:versionCode=&quot;1&quot; </li></ul><ul><li>android:versionName=&quot;1.0&quot;> </li></ul><ul><li><uses-sdk android:minSdkVersion=&quot;10&quot; /> </li></ul><ul><li><application android:icon=&quot;@drawable/icon&quot; android:label=&quot;@string/app_name&quot;> </li></ul><ul><li><activity android:name=&quot;.HelloworldActivity&quot; </li></ul><ul><li>android:label=&quot;@string/app_name&quot;> </li></ul><ul><li><intent-filter> </li></ul><ul><li><action android:name=&quot;android.intent.action.MAIN&quot; /> </li></ul><ul><li><category android:name=&quot;android.intent.category.LAUNCHER&quot; /> </li></ul><ul><li></intent-filter> </li></ul><ul><li></activity> </li></ul><ul><li></application> </li></ul><ul><li></manifest> </li></ul>
  23. 28. HelloWorld- Layout Resource File <ul><li><?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> </li></ul><ul><li><LinearLayout xmlns:android=&quot;; </li></ul><ul><li>android:orientation=&quot;vertical&quot; </li></ul><ul><li>android:layout_width=&quot;fill_parent&quot; </li></ul><ul><li>android:layout_height=&quot;fill_parent&quot; </li></ul><ul><li>> </li></ul><ul><li><TextView </li></ul><ul><li>android:layout_width=&quot;fill_parent&quot; </li></ul><ul><li>android:layout_height=&quot;wrap_content&quot; </li></ul><ul><li>android:text=&quot;@string/hello&quot; </li></ul><ul><li>/> </li></ul><ul><li></LinearLayout> </li></ul>
  24. 29. HelloWorld-JAVA File <ul><li>package com.folio3; </li></ul><ul><li>import; </li></ul><ul><li>import android.os.Bundle; </li></ul><ul><li>public class HelloAndroid extends Activity { </li></ul><ul><li>/** Called when the activity is first created. */ </li></ul><ul><li>@Override </li></ul><ul><li>public void onCreate(Bundle savedInstanceState) { </li></ul><ul><li>super.onCreate(savedInstanceState); </li></ul><ul><li>setContentView(R.layout.main); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>
  25. 30. Main Building Blocks
  26. 31. Main Building Blocks <ul><li>Activities </li></ul><ul><li>Intents </li></ul><ul><li>Services </li></ul><ul><li>Content Providers </li></ul><ul><li>Broadcast Receivers </li></ul>
  27. 32. Activities An Activity represents a screen or a window. Sort of.
  28. 33. Activity LifeCycle Activities have a well-defined lifecycle. The Android OS manages your activity by changing its state. You fill in the blanks.
  29. 34. Intents <ul><li>Intents represent events or actions. </li></ul><ul><li>They are to Android apps what </li></ul><ul><li>hyperlinks are to </li></ul><ul><li>websites. Sort of. </li></ul><ul><li>Intents can be </li></ul><ul><li>implicit or explicit. </li></ul>
  30. 35. Services <ul><li>Services are code that runs in the background. They can be started and stopped. Services doesn’t have UI. </li></ul>
  31. 36. Service LifeCycle <ul><li>Service also has a lifecycle, but it’s </li></ul><ul><li>much simpler than activity’s. </li></ul><ul><li>An activity typically starts and stops a </li></ul><ul><li>service to do some work for it in the </li></ul><ul><li>background, such as play music, </li></ul><ul><li>check for new tweets, etc. </li></ul><ul><li>Services can be bound or unbound. </li></ul>
  32. 37. Content Provider <ul><li>Content Providers share </li></ul><ul><li>content with applications </li></ul><ul><li>across application </li></ul><ul><li>boundaries. </li></ul><ul><li>Examples of built-in </li></ul><ul><li>Content Providers are: </li></ul><ul><ul><li>Contacts, </li></ul></ul><ul><ul><li>MediaStore, </li></ul></ul><ul><ul><li>Settings and more. </li></ul></ul>
  33. 38. Broadcast Receivers <ul><li>An Intent-based publish-subscribe mechanism. Great for listening system events such as SMS messages. </li></ul>
  34. 39. THANK YOU! Q/A