Learn how to develop for Android, beyond the Hello World android app - Cape Town Android Meetup
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Learn how to develop for Android, beyond the Hello World android app - Cape Town Android Meetup

  • 953 views
Uploaded on

Learn the core Android App development concepts beyond creating the Android App. We used the Yamba app from the Learning Android demonstrate the use of Android Activities, Services, Broadcast......

Learn the core Android App development concepts beyond creating the Android App. We used the Yamba app from the Learning Android demonstrate the use of Android Activities, Services, Broadcast Receivers, Intents and Content Providers.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
953
On Slideshare
953
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
15
Comments
0
Likes
1

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 App Development Beyond The HelloWorld App Cape Town Android Meetup Joseph Kandi Peruzal Android App Development Training Team www.peruzal.co.za
  • 2. Take Aways ! Android Development Environment Android Application Components Threads in Android Designing Android UIs in XML Using Intents Performing Web Service Calls
  • 3. Android Development Environment • • • Java Eclipse | Android Studio Android SDK
  • 4. Java Skill Level • • • • • • • • Variables • Operators String Loops Methods Class Static Inheritance • • • • • • Packages and Import Access Levels Constants Interface • • • • Casting • Boxing and UnBoxing Inheritance Abstract Generics Threads Enum Exception Handling
  • 5. Android and Java
  • 6. Android Software Stack Content Providers, Activity anager, Window Manager,View System, Notification System, Telephony Home, Contacts, Browser, Yamba SQLite, WebKit, SSL, OpenGL ES, Media Framework Custom Linux 2.6 kernel
  • 7. Inside Android Use command adb shell to logon to the device sdcard System partition Note the permissions on the folders
  • 8. Android Versions and API Level
  • 9. Get Java http://www.oracle.com/technetwork/java/javase/downloads/jdk7downloads-1880260.html
  • 10. Eclipse http://developer.android.com/sdk/index.html Download from this link
  • 11. Android Studio Still buggy, not ideal for beginners to Android development Download from here
  • 12. Building Blocks Activities Services Content Providers Broadcast Receivers Application
  • 13. Activity An activity is a single, focused thing that the user can do.
  • 14. Activity Life Cycle
  • 15. Activity Class Called when the activity will start interacting with the user Called the activity is first created Called when the activity is becoming visible to the user Called when the system is about to start resuming a previous activity Final call before the activity is destroyed Called after the activity has been stopped, prior to it being started again Called when activity is no longer visible
  • 16. Intents Messages sent among the major building blocks. They trigger an action to start up, tell a service to start or stop, or simple broadcast
  • 17. Services Services run in the background and don’t have a user interface components
  • 18. Content Providers Interfaces for sharing data
  • 19. Broadcast Receivers Android implementation of publish/subscribe mechanism or the Observer pattern
  • 20. Application Context Refers to the application environment and the process within which all the components are running ! Used to share data between components Context.getApplicationContext Activity.getApplication
  • 21. Android User Interface Java - done in code XML - declarative
  • 22. Views Android organizes its UI into layout and views
  • 23. Write the xml Load the XML Resource
  • 24. Layouts
  • 25. Example Linear Layout Also called match_parent Either
  • 26. Relative Example
  • 27. Creating a New Project • Walkthrough, create a new project
  • 28. Choose New Project
  • 29. Project Name - NB No spaces allowed The name of the app Package name, usually reverse dns of your company name Minimum supported SDK the app will run on The version of Android we are building for Does not do anything, ignore Create an initial activity
  • 30. Customize the launcher Path for the image used as a launch icon on the home screen Preview of the launch icon on different screen resolutions
  • 31. Choose “Blank Activity” here Choose Activity Type Choose different activity types
  • 32. Choose Main Activity Name Leave it as MainActivity for now, in future we will change it The xml file defining the user interface for our activity Leave as is
  • 33. Project Structure Main activity created during project setup Resource folders go under “res” folder xml layout file defining the screen for the app Explains what application consists, the main building blocks, permissions
  • 34. AndroidMainfest.xml Package name for the application Android SDK Main activity action Activity declaration Intent Category of the action
  • 35. Layout xml Live preview xml defining the UI File lives under “layout” resource folder
  • 36. Main Activity xml file Layout container xml properties View component
  • 37. Java file Extends Activity class Using the class R to point to the layout
  • 38. R file | Auto-generated R.layout.activity_main, referring to the file under /layout/activity_main.xml
  • 39. strings.xml Value Key used to retrieve the string
  • 40. AVD | Android Virtual Device Launch AVD manager Launch AVD manager
  • 41. AVD Manager AVD images Available devices, need at least one to test the app Add a new AVD
  • 42. Create a New AVD Choose name, no spaces allowed Choose device specifications Camera support Amount of RAM Improves speed of the emulator Android SDK version
  • 43. User Interface and Controls • Project Overview
  • 44. Project Overview Yamba App Context Status Activity post status update Twitter Service 1
  • 45. Status Activity
  • 46. Timeline Activity
  • 47. Action Bar | Menu
  • 48. Preferences