Android Dev <ul><li>[email_address] </li></ul>
Android Platform(1)
Android Platform(2) <ul><li>Linux for device drivers, memory management, process management, networking </li></ul><ul><li>...
More about Dalvik <ul><li>It is optimized for low memory requirements, and is designed to allow multiple VM instances to r...
Dev environment <ul><li>Java </li></ul><ul><li>Android SDKs + source code </li></ul><ul><ul><li>libs,  </li></ul></ul><ul>...
android-project
Application Fundamentals <ul><li>Activities/Services/Content Providers/Broadcast receivers </li></ul><ul><li>Intent(async ...
Activity <ul><li>Associate with layout-view </li></ul><ul><li>In stack(could be multiple instances) </li></ul><ul><li>Life...
intent-example-oauth <ul><ul><li>1. < activity   android:name = &quot;.ArticleActivity&quot; > </li></ul></ul><ul><li>< in...
Layout/View <ul><li>Two kinds of UI elements, one is layout(manager), the other is View </li></ul><ul><li>SDK provides lot...
Resources <ul><li>drawable assets, (png, xml) </li></ul><ul><li>strings </li></ul><ul><li>styles </li></ul><ul><li>UI patt...
Performance Tips <ul><li>Caching (weak reference) </li></ul><ul><li>Improve ListView ( http://www.google.com/events/io/201...
your own app/game? <ul><li>Publishing, no app review on android-market </li></ul><ul><li>User experience is the most impor...
Upcoming SlideShare
Loading in...5
×

Android dev

2,292

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,292
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
105
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Android dev

  1. 1. Android Dev <ul><li>[email_address] </li></ul>
  2. 2. Android Platform(1)
  3. 3. Android Platform(2) <ul><li>Linux for device drivers, memory management, process management, networking </li></ul><ul><li>Next level up is the android native libs, written in c/c++ internally. Call from java interfaces. </li></ul><ul><li>Dalvik VM. Dalvik runs dex files, converted from standard class file at compile time. </li></ul><ul><li>Application Framework, for developers </li></ul>
  4. 4. More about Dalvik <ul><li>It is optimized for low memory requirements, and is designed to allow multiple VM instances to run at once, relying on the underlying OS for process isolation, MM and thread support. </li></ul><ul><li>one app 16m memory </li></ul>
  5. 5. Dev environment <ul><li>Java </li></ul><ul><li>Android SDKs + source code </li></ul><ul><ul><li>libs, </li></ul></ul><ul><ul><li>dev tools: dx, aapt, adb, ddms, ant scripts </li></ul></ul><ul><ul><li>Simulators, docs, sample codes </li></ul></ul><ul><li>Eclipse + ADT (optional) </li></ul>
  6. 6. android-project
  7. 7. Application Fundamentals <ul><li>Activities/Services/Content Providers/Broadcast receivers </li></ul><ul><li>Intent(async messaging bundle) </li></ul><ul><li>Manifest File </li></ul><ul><li>layouts </li></ul><ul><li>resources </li></ul>
  8. 8. Activity <ul><li>Associate with layout-view </li></ul><ul><li>In stack(could be multiple instances) </li></ul><ul><li>Lifecycle </li></ul><ul><li>UI(Main) thread/Other threads: </li></ul><ul><ul><li>Don’t block the UI thread </li></ul></ul><ul><ul><li>Do not access the android ui toolkit from outside the UI thread </li></ul></ul><ul><ul><li>AsyncTask </li></ul></ul>
  9. 9. intent-example-oauth <ul><ul><li>1. < activity android:name = &quot;.ArticleActivity&quot; > </li></ul></ul><ul><li>< intent-filter > </li></ul><ul><li>< action android:name = &quot;android.intent.action.VIEW&quot; ></ action > </li></ul><ul><li>< category android:name = &quot;android.intent.category.DEFAULT&quot; ></ category > </li></ul><ul><li>< category android:name = &quot;android.intent.category.BROWSABLE&quot; ></ category > </li></ul><ul><li>< data android:scheme = &quot;mashableoauth&quot; android:host = &quot;twitt&quot; ></ data > </li></ul><ul><li></ intent-filter > </li></ul><ul><li></ activity > </li></ul><ul><li>2. ArticleActivity. startActivity( new Intent(Intent. ACTION_VIEW , Uri.parse( requestToken .getAuthenticationURL()))); </li></ul><ul><li>3. protected void onNewIntent(Intent intent) { </li></ul><ul><li>Uri uri = intent.getData(); </li></ul><ul><li>if (uri != null && uri.toString().startsWith( CALLBACK_URL )) { </li></ul><ul><li>.... </li></ul><ul><li>} </li></ul>
  10. 10. Layout/View <ul><li>Two kinds of UI elements, one is layout(manager), the other is View </li></ul><ul><li>SDK provides lots of layouts </li></ul><ul><li>SDK provides lots of views, like list-view, button, text-view, image-view, progress dialog.... </li></ul><ul><li>custom-view steps(measure then layout) </li></ul><ul><ul><li>direct use the canvas to draw the view </li></ul></ul>
  11. 11. Resources <ul><li>drawable assets, (png, xml) </li></ul><ul><li>strings </li></ul><ul><li>styles </li></ul><ul><li>UI patterns ( http://www.google.com/events/io/2010/sessions/android-ui-design-patterns.html ) </li></ul>
  12. 12. Performance Tips <ul><li>Caching (weak reference) </li></ul><ul><li>Improve ListView ( http://www.google.com/events/io/2010/sessions/world-of-listview-android.html ) </li></ul><ul><li>Other tips </li></ul><ul><ul><li>http://www.google.com/events/io/2010/sessions/beginners-guide-android.html </li></ul></ul><ul><ul><li>devguide( http://developer.android.com/guide/practices/design/performance.html ) </li></ul></ul>
  13. 13. your own app/game? <ul><li>Publishing, no app review on android-market </li></ul><ul><li>User experience is the most important thing </li></ul><ul><ul><li>UI/Navigation </li></ul></ul><ul><ul><li>You have 5 seconds for user operations to finish, but 100-200ms, user feels the lag </li></ul></ul><ul><ul><li>widgets, notifications, services </li></ul></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×