Introducing Android Platform

Embed Size (px)

Citation preview

  • 1. PRESENTATION Introducing ANDROID PLATFORM by Armen Polischuk

2. Android Structure Feb, 202011 Lohika 3. Core OS Libraries Feb, 202011 Lohika 4. Framework Libraries Feb, 202011 Lohika 5. APK Structure Feb, 202011 Lohika 6. Native APK Structure Feb, 202011 Lohika 7. Foundational Components

  • Resources

8. Intents 9. Activities 10. Content Providers Feb, 202011 Lohika 11. Resources

  • XML-based

12. Raw resources 13. Assets Feb, 202011 Lohika 14. XML-based Resources

  • Compiled animation files

15. Bitmaps 16. UI definitions 17. Colors, dimensions, strings, styles 18. Compiled XML files Feb, 202011 Lohika 19. Resolving Resources Directory structure: /res/values/(strings | colors | dimens | attrs | styles).xml /drawable/(*.png | *.jpg | *.gif) /anim/*.xml /layout/*.xml /raw/*.* /xml/*.xml /assets/*.*/*.* And suffixes: drawable-mcc310-en-rUS-large-long-port-mdpi-stylus-keyssoft-qwerty-dpad-v3 Feb, 202011 Lohika 20. Intents

  • - is an action with its associated data payload Important Parameters:
  • Action

21. Category 22. URI Feb, 202011 Lohika 23. Intents - Examples

  • Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.google.com")); activity.startActivity(intent); Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse("tel:555-555-5555")); activity.startActivity(intent);

Feb, 202011 Lohika 24. Activities

  • Represents a screen that an application can show to its users.

25. Can be wired up with Intents 26. Or can be called from code Feb, 202011 Lohika 27. Activities Intent Filter ..user" /> .. Feb, 202011 Lohika 28. Data Providers

  • Exposes data sources

29. As RESTfull service 30. Uses URI to retrieve data 31. Uses MIME types for data distinction Feb, 202011 Lohika 32. Data Providers - Examples Retrieve data: Cursor cursor =getContentResolver().query( uri, projection, where, sort);URI creation rules: content://com..provider./ MIME types: Single item - vnd..cursor.item/ All items - vnd..cursor.dir/ Feb, 202011 Lohika 33. Working Example Mercurial: http://eadditives.hg.sourceforge.net/hgweb/eadditives/eadditives/ Android Market: https://market.android.com/details?id=net.sf.additives Feb, 202011 Lohika 34. Docs & Publications Core Android Resources http://developer.android.com Feb, 202011 Lohika