Your SlideShare is downloading. ×
Android dev
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Android dev

2,254
views

Published on

Published in: Technology

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

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

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

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