SlideShare a Scribd company logo
1 of 30
1 
• Android application development
Run Eclipse IDE 
2
Run Eclipse IDE 
3
• You can run android sdk manager to upgrade and install your android 
development tools! 
4
• For the first time, everything should be already installed and upgraded to 
latest version! 
• But, later you can use this tool to upgrade to recent versions. 
5
• Now, create a android virtual device using android virtual device manager. 
• This device will be the emulator which will run your android applications! 
6
• In the diagram, we see no virtual device, so we will need to create one. 
• In this stage, click New to create a new virtual device. 
7
• Give a name to your virtual device, e.g., MyAVD 
• Select a Device that will be emulated. In this case, select a 4.0” WVGA 
android device 
• Select other options as required and clock OK. 
8
• Your android virtual device is now ready to run your android applications! 
• Now, its time to create the application itself! 
9
• Create a New Android Application Project. 
• New->Android Application Project. 
10
• Give application name, package name, and select other options. Click 
Next. 
• Package name must be unique, so give it a unique name. 
• Select minimum required sdk as API8 
11
• Deselect the customer launcher icon, in this stage we do not need it. 
• We can test it later. 
12
• Select a blank activity, keep other things default. 
• After you finally click finish, your default android application will be ready 
and opened automtically 
13
• Your just created default application will look like this! 
• Android activity xml file is opened by default! 
14
Before you run your app, you should be aware of a few 
directories and files in the Android project: 
15
Folder, File & Description 
• 1 src 
This contains the .java source files for your project. By default, it includes 
an MainActivity.javasource file having an activity class that runs when 
your app is launched using the app icon. 
• 2 gen 
This contains the .R file, a compiler-generated file that references all the 
resources found in your project. You should not modify this file. 
• 3 bin 
This folder contains the Android package files .apk built by the ADT during 
the build process and everything else needed to run an Android 
application. 
16
Folder, File & Description(Cont.) 
• 4 res/drawable-hdpi 
This is a directory for drawable objects that are designed for high-density 
screens. 
• 5 res/layout 
This is a directory for files that define your app's user interface. 
• 6 res/values 
This is a directory for other various XML files that contain a collection of 
resources, such as strings and colors definitions. 
• 7 AndroidManifest.xml 
This is the manifest file which describes the fundamental characteristics of 
the app and defines each of its components. 
17
• Now, you will run your default application. You need to open 
the file. Open the activity java file under src folder. 
• Then click the run icon in the toolbar! 
18
• For the first time run, you will be asked to select different options for 
running 
• First, select Android Application in this stage. This means you are going to 
run the program as Android Application 
19
• Be patient for the first to run avd! It may take 10-15 minutes to start up for 
the first time. After it is loaded, your application will be installed and main 
activity will be started! 
• Congratulations on your first successful HelloWorld application! 
20
• Now, test with emulators different button, icons, screens if you are not 
already familiar with android phone! Remember, the response might be a 
bit slow in your pc! 
21
• Now, we will modify our HelloWorld android application! 
• Click on the activity xml file again! You will see the acitivity window! 
22
• Remove the TextView item first from the window! Then drag and drop a 
new TextView and a Button into your window. 
23
• To edit the properties of the button and textview you just added, go to 
activity xml view by clicking it. This will open the activity xml file rather 
than the graphical window! 
24
• Now, first set, text propertyof button to something “Say Hi!” and remove 
the text property of the TextView by deleting the line. 
• See the id of the textview, it will be used in the next task 
25
• Open your main activity java file. Add a new function and import the class 
View. This function will be the handler of the button click in your android 
application. 
26
• Now, add the following codes in your activity. This will set the text of the 
TextView to “Hello World” once the button is clicked! 
27
• Now, open activity xml file and then add the following codes. This will 
connect the button to your added function. When user will press the button, 
the function will be called! 
28
• Now, run your application again! Remember to keep the activity java file 
open. 
• You will see your newly created application and the button! Click the 
button! 
29
• Clicking the button, the textview will appear with text “Hello World”! 
Congratulation! You just completed an interaction between button, user and 
other component, i.e., TextView! 
30

More Related Content

What's hot

Lecture 12: React-Native Firebase Authentication
Lecture 12: React-Native Firebase AuthenticationLecture 12: React-Native Firebase Authentication
Lecture 12: React-Native Firebase AuthenticationKobkrit Viriyayudhakorn
 
Deployment options for mule applications
Deployment options for mule applicationsDeployment options for mule applications
Deployment options for mule applicationssivachandra mandalapu
 
Android introduction
Android introductionAndroid introduction
Android introductionPingLun Liao
 
ASP.NET Session 5
ASP.NET Session 5ASP.NET Session 5
ASP.NET Session 5Sisir Ghosh
 
Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...
Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...
Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...InnovationM
 
Tutorial: extending the zend server ui and web api
Tutorial: extending the zend server ui and web apiTutorial: extending the zend server ui and web api
Tutorial: extending the zend server ui and web apiYonni Mendes
 
Beta testing guidelines for developer
Beta testing guidelines for developerBeta testing guidelines for developer
Beta testing guidelines for developerKetan Raval
 
Automating with selenium2
Automating with selenium2Automating with selenium2
Automating with selenium2mindqqa
 
Selenium ide1
Selenium ide1Selenium ide1
Selenium ide1mindqqa
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using seleniummindqqa
 

What's hot (12)

Lecture 12: React-Native Firebase Authentication
Lecture 12: React-Native Firebase AuthenticationLecture 12: React-Native Firebase Authentication
Lecture 12: React-Native Firebase Authentication
 
I Phone101
I Phone101I Phone101
I Phone101
 
Deployment options for mule applications
Deployment options for mule applicationsDeployment options for mule applications
Deployment options for mule applications
 
Android introduction
Android introductionAndroid introduction
Android introduction
 
ASP.NET Session 5
ASP.NET Session 5ASP.NET Session 5
ASP.NET Session 5
 
Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...
Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...
Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...
 
Cloud hub deployment
Cloud hub deploymentCloud hub deployment
Cloud hub deployment
 
Tutorial: extending the zend server ui and web api
Tutorial: extending the zend server ui and web apiTutorial: extending the zend server ui and web api
Tutorial: extending the zend server ui and web api
 
Beta testing guidelines for developer
Beta testing guidelines for developerBeta testing guidelines for developer
Beta testing guidelines for developer
 
Automating with selenium2
Automating with selenium2Automating with selenium2
Automating with selenium2
 
Selenium ide1
Selenium ide1Selenium ide1
Selenium ide1
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
 

Viewers also liked (20)

Activity & Shared Preference
Activity & Shared PreferenceActivity & Shared Preference
Activity & Shared Preference
 
Play Store
Play StorePlay Store
Play Store
 
10 commandments for better android development
10 commandments for better android development10 commandments for better android development
10 commandments for better android development
 
Mobile Application capacity building activities
Mobile Application capacity building activities Mobile Application capacity building activities
Mobile Application capacity building activities
 
Google Map V2
Google Map V2Google Map V2
Google Map V2
 
Support Multiple Screen
Support Multiple ScreenSupport Multiple Screen
Support Multiple Screen
 
GCM (push notification)
GCM (push notification)GCM (push notification)
GCM (push notification)
 
Listview
ListviewListview
Listview
 
Intent
IntentIntent
Intent
 
Ad Mob
Ad MobAd Mob
Ad Mob
 
Android101 - Intro and Basics
Android101 - Intro and BasicsAndroid101 - Intro and Basics
Android101 - Intro and Basics
 
Android: the Single Activity, Multiple Fragments pattern | One Activity to ru...
Android: the Single Activity, Multiple Fragments pattern | One Activity to ru...Android: the Single Activity, Multiple Fragments pattern | One Activity to ru...
Android: the Single Activity, Multiple Fragments pattern | One Activity to ru...
 
Android Location Api
Android Location ApiAndroid Location Api
Android Location Api
 
Event Handling
Event HandlingEvent Handling
Event Handling
 
Android UI
Android UIAndroid UI
Android UI
 
android design pattern
android design patternandroid design pattern
android design pattern
 
Broadcast Receiver
Broadcast ReceiverBroadcast Receiver
Broadcast Receiver
 
Android - Android Intent Types
Android - Android Intent TypesAndroid - Android Intent Types
Android - Android Intent Types
 
Android Sensor
Android SensorAndroid Sensor
Android Sensor
 
[Android] Intent and Activity
[Android] Intent and Activity[Android] Intent and Activity
[Android] Intent and Activity
 

Similar to Project anatomy & hello world

Introduction to Android and Java.pptx
Introduction to Android and Java.pptxIntroduction to Android and Java.pptx
Introduction to Android and Java.pptxGandhiMathy6
 
Android Studio development model and.pptx
Android Studio development model and.pptxAndroid Studio development model and.pptx
Android Studio development model and.pptxVaibhavKhunger2
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Javaamaankhan
 
Build Your First Android App Session #1
Build Your First Android App Session #1Build Your First Android App Session #1
Build Your First Android App Session #1Troy Miles
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps QuicklyGil Irizarry
 
Android app development by abhi android
Android app development by abhi androidAndroid app development by abhi android
Android app development by abhi androidsusijanny
 
Android app development
Android app developmentAndroid app development
Android app developmentAbhishek Saini
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Gil Irizarry
 
Homework seriesandroidworkshop JUly 12th
Homework seriesandroidworkshop JUly 12thHomework seriesandroidworkshop JUly 12th
Homework seriesandroidworkshop JUly 12thRishi Kumar
 
Android app development lesson 1
Android app development lesson 1Android app development lesson 1
Android app development lesson 1Kalluri Vinay Reddy
 
Build your first android mobile app
Build your first android mobile appBuild your first android mobile app
Build your first android mobile appekipaco
 
Emergency androidstudiochapter
Emergency androidstudiochapterEmergency androidstudiochapter
Emergency androidstudiochapterAravindharamanan S
 
Ios training-cum-course-in-mumbai-
Ios training-cum-course-in-mumbai-Ios training-cum-course-in-mumbai-
Ios training-cum-course-in-mumbai-vibrantuser
 
Android workshop
Android workshopAndroid workshop
Android workshopSagar Patel
 

Similar to Project anatomy & hello world (20)

Introduction to Android and Java.pptx
Introduction to Android and Java.pptxIntroduction to Android and Java.pptx
Introduction to Android and Java.pptx
 
Android Studio development model and.pptx
Android Studio development model and.pptxAndroid Studio development model and.pptx
Android Studio development model and.pptx
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 
Android session 1
Android session 1Android session 1
Android session 1
 
Build Your First Android App Session #1
Build Your First Android App Session #1Build Your First Android App Session #1
Build Your First Android App Session #1
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps Quickly
 
Android app development by abhi android
Android app development by abhi androidAndroid app development by abhi android
Android app development by abhi android
 
Android app development
Android app developmentAndroid app development
Android app development
 
Android programming-basics
Android programming-basicsAndroid programming-basics
Android programming-basics
 
Intro to android (gdays)
Intro to android (gdays)Intro to android (gdays)
Intro to android (gdays)
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
 
Homework seriesandroidworkshop JUly 12th
Homework seriesandroidworkshop JUly 12thHomework seriesandroidworkshop JUly 12th
Homework seriesandroidworkshop JUly 12th
 
Android app development lesson 1
Android app development lesson 1Android app development lesson 1
Android app development lesson 1
 
Build your first android mobile app
Build your first android mobile appBuild your first android mobile app
Build your first android mobile app
 
Getting started with android studio
Getting started with android studioGetting started with android studio
Getting started with android studio
 
Android
AndroidAndroid
Android
 
Emergency androidstudiochapter
Emergency androidstudiochapterEmergency androidstudiochapter
Emergency androidstudiochapter
 
Appium- part 1
Appium- part 1Appium- part 1
Appium- part 1
 
Ios training-cum-course-in-mumbai-
Ios training-cum-course-in-mumbai-Ios training-cum-course-in-mumbai-
Ios training-cum-course-in-mumbai-
 
Android workshop
Android workshopAndroid workshop
Android workshop
 

Project anatomy & hello world

  • 1. 1 • Android application development
  • 4. • You can run android sdk manager to upgrade and install your android development tools! 4
  • 5. • For the first time, everything should be already installed and upgraded to latest version! • But, later you can use this tool to upgrade to recent versions. 5
  • 6. • Now, create a android virtual device using android virtual device manager. • This device will be the emulator which will run your android applications! 6
  • 7. • In the diagram, we see no virtual device, so we will need to create one. • In this stage, click New to create a new virtual device. 7
  • 8. • Give a name to your virtual device, e.g., MyAVD • Select a Device that will be emulated. In this case, select a 4.0” WVGA android device • Select other options as required and clock OK. 8
  • 9. • Your android virtual device is now ready to run your android applications! • Now, its time to create the application itself! 9
  • 10. • Create a New Android Application Project. • New->Android Application Project. 10
  • 11. • Give application name, package name, and select other options. Click Next. • Package name must be unique, so give it a unique name. • Select minimum required sdk as API8 11
  • 12. • Deselect the customer launcher icon, in this stage we do not need it. • We can test it later. 12
  • 13. • Select a blank activity, keep other things default. • After you finally click finish, your default android application will be ready and opened automtically 13
  • 14. • Your just created default application will look like this! • Android activity xml file is opened by default! 14
  • 15. Before you run your app, you should be aware of a few directories and files in the Android project: 15
  • 16. Folder, File & Description • 1 src This contains the .java source files for your project. By default, it includes an MainActivity.javasource file having an activity class that runs when your app is launched using the app icon. • 2 gen This contains the .R file, a compiler-generated file that references all the resources found in your project. You should not modify this file. • 3 bin This folder contains the Android package files .apk built by the ADT during the build process and everything else needed to run an Android application. 16
  • 17. Folder, File & Description(Cont.) • 4 res/drawable-hdpi This is a directory for drawable objects that are designed for high-density screens. • 5 res/layout This is a directory for files that define your app's user interface. • 6 res/values This is a directory for other various XML files that contain a collection of resources, such as strings and colors definitions. • 7 AndroidManifest.xml This is the manifest file which describes the fundamental characteristics of the app and defines each of its components. 17
  • 18. • Now, you will run your default application. You need to open the file. Open the activity java file under src folder. • Then click the run icon in the toolbar! 18
  • 19. • For the first time run, you will be asked to select different options for running • First, select Android Application in this stage. This means you are going to run the program as Android Application 19
  • 20. • Be patient for the first to run avd! It may take 10-15 minutes to start up for the first time. After it is loaded, your application will be installed and main activity will be started! • Congratulations on your first successful HelloWorld application! 20
  • 21. • Now, test with emulators different button, icons, screens if you are not already familiar with android phone! Remember, the response might be a bit slow in your pc! 21
  • 22. • Now, we will modify our HelloWorld android application! • Click on the activity xml file again! You will see the acitivity window! 22
  • 23. • Remove the TextView item first from the window! Then drag and drop a new TextView and a Button into your window. 23
  • 24. • To edit the properties of the button and textview you just added, go to activity xml view by clicking it. This will open the activity xml file rather than the graphical window! 24
  • 25. • Now, first set, text propertyof button to something “Say Hi!” and remove the text property of the TextView by deleting the line. • See the id of the textview, it will be used in the next task 25
  • 26. • Open your main activity java file. Add a new function and import the class View. This function will be the handler of the button click in your android application. 26
  • 27. • Now, add the following codes in your activity. This will set the text of the TextView to “Hello World” once the button is clicked! 27
  • 28. • Now, open activity xml file and then add the following codes. This will connect the button to your added function. When user will press the button, the function will be called! 28
  • 29. • Now, run your application again! Remember to keep the activity java file open. • You will see your newly created application and the button! Click the button! 29
  • 30. • Clicking the button, the textview will appear with text “Hello World”! Congratulation! You just completed an interaction between button, user and other component, i.e., TextView! 30