Your SlideShare is downloading. ×
0
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Android application development workshop   day1
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Android application development workshop day1

433

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
433
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
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 Application Development Workshop Day 1 Borhan Otour
  • 2. Hello World , this is Android 
  • 3. Agenda What we will cover today •The Android System and the Android SDK • Preparing for the party (Android Installation) •Building the first Application 1. 2. 3. 4. Create a new Android project (project structure) Launch the Android Application (AVDs) Create a simple view (Views and Resource systems) Connecting to another activity (Intent system)
  • 4. The Android System Architecture
  • 5. The Android Market and Activations By 2013 , there were Android Device Activated. SO THERE IS A LOT OF PEOPLE WHO NEEDS APPS FROM YOU.
  • 6. The Installation •What do you need to prepare the development environment? 1. The Android SDK 2. An editor to code your project or The Integrated Development Environment (Eclipse IDE) 3. Connect the IDE and the SDK to begin developing for the Android market  (Android developer tool ADT) • ( SDK + Eclipse )* ADT = My Android Development Environment • Remember: SDK = Android development tools + Android application framework
  • 7. Building the first application (AVDs) •The Android Virtual Device (The Emulator) Note: The API levels (The SDK versions)
  • 8. The project structure What is important are two main directories and an xml file : 1. src/ 2. res/ 3. AndroidManifest.xml
  • 9. Android Application development (create a simple layout) The activity: the most important Android application component. It’s a java class that represent a Screen. Each application must contain one screen . This is an Activity Note: The activity is not a layout
  • 10. Android Application development (create a simple layout) .cont The view: The view is the fundamental component you see in the “screen” that is used to build layouts. The views can be containers or a widgets.
  • 11. Android Application development (create a simple layout) .cont •The layout is composed of a hierarchy of views •You can assign a view to an activity by using the following instruction - setContentView(View view|ViewId);
  • 12. Android Application development (create a simple layout) .cont • The layouts in Android application follows a hierarchical manner , and the best way to represents hierarchies in the code is to use XML. (see the next slide) • To reach a layout resource (like a button)in the code, I need to (1) assign an ID to that resource : @+id/identifier , (2) in the code I can reach the layout resource using the findViewById(R.id. identifier) Activity method • Note: More about resources and layout will be covered in Day 2 in the workshop.
  • 13. The activity_main.xml file that represents the layout of the MainActivity.java
  • 14. Interconnection between activities (The Intent system) Activity 1 Activity 2 • When you want to launch a new Activity from the current Activity you need to use Intents. • The Intent represents the Application Intention to do something, which is (launching a new “Screen”) . • You specifies the current Activity and the name of the Destination Activity in the construction of intent object. Intent intent = new Intent(this , destinationActivityName.class) • You can put extra content in the message that you send to launch a new Activity. Intent.putExtras( String key , value);
  • 15. Interconnection between activities (The Intent system) .cont • To launch the new Activity from the current activity use the Activity method: startActivity(Intent intent) • To get the Intent object that caused the activity to be launched: In the destination Activity , use the activity method: getIntent() • To extract the extra data from the intent based of the type of data ( like String data for instance ) : intent.getStringExtras(String key)
  • 16. References •http://developer.android.com/index.html •The API documentation http://developer.android.com/reference/packages.html • Building the first application http://developer.android.com/training/basics/firstapp/index .html

×