SlideShare a Scribd company logo
BUILD YOUR FIRST
ANDROID MOBILE APP
This should be a very short (beginner) introduction/tutorial how
to create a mobile app for Android. The tutorial is based on API
Level 17 and Android 4.2 (Jelly Bean). Our goal is to start from
scratch and have at the end a mp/h to km/h converter.
What Do You Need?
1. Basic XML knowledge
2. Basic Java knowledge
3. Basic Eclipse knowledge
4. 2h of your time
Pre requisites:
1. Before you can start you need the Android SDK and a
IDE. Android offers a special bundle for that: Android
SDK Bundle
2. Download the bundle, unzip and run the “SDK
Manager.exe”.
3. start Eclipse
Create An Android
Virtual Machine
Create An Android
Virtual Machine
• To run, test and debug your Application you can create and run a virtual android
machine on your computer. Later you can deploy your Application to this virtual
machine.
• Click on “Windows” at the navigation toolbar
• Open “Android Virtual Device manager“
Create a “New” Virtual Device:
Be sure that “Use Host GPU” is enabled. This allows the
AVD to use the Host GPU and this helps to render the AVD
much faster.
After that you can start the AVD:
Create a new Project:
• Open “File“
• “New“
• “Android Application Project“
Choose a new for your Project:
Configure Project:
Configure Launcher Icon:
Here you can choose a Launcher Icon that will be displayed on your mobile
phone.
Create a new Activity:
Configure Your Activity
After finishing Eclipse looks similar to that:
Implement the Look & Feel:
Navigate in the package explorer to “/res/layout/” and open
“activity_main.xml“
Right-click on “Hello World” and delete
Create static Attributes:
Select “/res/values/strings.xml“
“Add” a new entry
Select the Color entry – press OK and
set the following attributes:
Add a few more String(!) Attributes:
Name/value: “miles” / “to Miles“
Name/value: “kmh” / “to km/h“
Name/value: “calc” / “Calculate“
Switch from “Resources” to “strings.xml” and
make sure that your code look similar to that
snippet:
Add Views
Select “/res/layout/activity_main.xml“
Open Android editor via double-click
You have two possibilities. You can create new Views via drag and drop
or you can edit the XML source code. In this tutorial we add the Views
via drag and drop
So let’s start building our App. At first we have to add a “Text Field” for
the input.
Drag this Text Field to your Application.
Afterwards select the “Form Widget” section and
drag a RadioGroupto your App and make sure that
the RadioGroup has twoRadioButtons. Finally you
can add a normal Button.
Switch from “Graphical Layout” to “activity_main.xml”
and make sure that your code looks similar to that:
Build your first android mobile app
Edit view properties
You can edit properties of Views via right-click on the view or
via XML.
Navigate to “res/layout/” and open the Graphical Layout of
your “activity_main.xml“
right-click on the first Radio Button and open “Edit Text”
Build your first android mobile app
• Assign the miles property to the second Radio
Button
• Set the “Checked” property for the first Radio
Button (Other Properties -> inherited from
compoundbutton -> checked -> true)
• Set the “Input type” property for the Text Field
to “numberSigned” and “numberDecimal“
• Assign “calc” to the Button and set “calculate”
for the “onClick” property (Other Properties ->
inherited from view -> onClick)
• Set Background-Color (Right-click on an empty
space on your Application -> Edit Background)
After that change the Background should be #eeeeee! I think it can be difficult to
see the difference.
Implement the Logic
After we implemented the Frontend-View we have to implement
the logical part with Java!
Switch to “src/com.example.tutorialapplication/” and open
“MainActivity.java“
Build your first android mobile app
Build your first android mobile app
This short but useful tutorial courtesy goes to MARC KLEIN.
To know more about technologies log on to http://ekipa.co !
A one stop solution for all your programming needs.

More Related Content

PPTX
React native introduction
PPTX
Android App Development 20150409
PPTX
Android App Development 20150402
PDF
Step by step instructions for the Royal Locker Kiosk App
PPTX
Android App Development 20150611
PPTX
Wordpress Integration Tutorial
PPTX
05 wp7 launchers and choosers
DOC
Expense personalization
React native introduction
Android App Development 20150409
Android App Development 20150402
Step by step instructions for the Royal Locker Kiosk App
Android App Development 20150611
Wordpress Integration Tutorial
05 wp7 launchers and choosers
Expense personalization

What's hot (20)

PDF
Mobile Programming - 7 Side Effects, Effect Handlers, and Simple Animations
PPTX
Google Map Implementation with offline feature.
PDF
Simulate App User Experience Axure Mobile Prototype Android
PPTX
"Discover windows phone" 05. Application Bar
PPTX
Getting Started With Developing For Apple Watch
PPTX
Android App Development 20150604
PPTX
AIDAHelp - App Basic Info
PPTX
React event
PPTX
2.5 clock, desktop, and dictionary objects
PPTX
3.4 events and interactivity
PPTX
Amazon Lumberyard Interface
PDF
Getting Started with Developing for the Apple Watch
PDF
Mobile App Marketing & Development
PPTX
Jenkins Plugin
PPTX
Introduction to iPad Applications
PPTX
AIDAHelp - Upload App Icon
PDF
Rmi roma calculator
PPTX
Android App Development 20150507
PPTX
Putti News/Events Tutorial
PDF
Flutter Festivals IIT Goa Session 2
Mobile Programming - 7 Side Effects, Effect Handlers, and Simple Animations
Google Map Implementation with offline feature.
Simulate App User Experience Axure Mobile Prototype Android
"Discover windows phone" 05. Application Bar
Getting Started With Developing For Apple Watch
Android App Development 20150604
AIDAHelp - App Basic Info
React event
2.5 clock, desktop, and dictionary objects
3.4 events and interactivity
Amazon Lumberyard Interface
Getting Started with Developing for the Apple Watch
Mobile App Marketing & Development
Jenkins Plugin
Introduction to iPad Applications
AIDAHelp - Upload App Icon
Rmi roma calculator
Android App Development 20150507
Putti News/Events Tutorial
Flutter Festivals IIT Goa Session 2
Ad

Viewers also liked (12)

DOC
Máy hút ẩm fujie hm 630 eb
PDF
DOCX
Samir Ngirim Doa
PPTX
JAVA PROGRAMS
PPTX
Baabtra.com little coder chapter - 1
PPT
Basic Essay Style
PPTX
Android Training For Beginner @DILO Bandung
PPT
ES-318: Computer As Educational Aids
PPSX
PJP-Introduction
PPTX
Computer assissted instructions (cai)
PPTX
Programming language (JGMNHS)
Máy hút ẩm fujie hm 630 eb
Samir Ngirim Doa
JAVA PROGRAMS
Baabtra.com little coder chapter - 1
Basic Essay Style
Android Training For Beginner @DILO Bandung
ES-318: Computer As Educational Aids
PJP-Introduction
Computer assissted instructions (cai)
Programming language (JGMNHS)
Ad

Similar to Build your first android mobile app (20)

PPT
Android
PDF
How to Create Your First Android App Step by Step.pdf
PPTX
Project anatomy & hello world
DOCX
CS6611 Mobile Application Development Laboratory
DOCX
Cs 6611 mad lab manual
ODP
Android tutorials7 calculator
PDF
Android application development workshop day1
PPT
Android Bootcamp Tanzania:understanding ui in_android
PDF
Android Development: Build Android App from Scratch
DOCX
Android Lab Mannual 18SUITSP5.docx
PDF
Android programming-basics
KEY
Android Workshop
PPTX
Android workshop
PPT
Synapseindia android apps intro to android development
PPT
Cs4hs android-01hello
PDF
Ap quiz app
PDF
Android app development guide for freshers by ace web academy
PPT
Android
PDF
Lab1-android
PPTX
03 layouts & ui design - Android
Android
How to Create Your First Android App Step by Step.pdf
Project anatomy & hello world
CS6611 Mobile Application Development Laboratory
Cs 6611 mad lab manual
Android tutorials7 calculator
Android application development workshop day1
Android Bootcamp Tanzania:understanding ui in_android
Android Development: Build Android App from Scratch
Android Lab Mannual 18SUITSP5.docx
Android programming-basics
Android Workshop
Android workshop
Synapseindia android apps intro to android development
Cs4hs android-01hello
Ap quiz app
Android app development guide for freshers by ace web academy
Android
Lab1-android
03 layouts & ui design - Android

More from ekipaco (7)

PDF
a66c4b97ceab4ebcb843ba0f7c99fd0e
PPTX
Top 10 Benefits Of Agile Methodology
PPTX
Best Practices For Sourcing In India
PPTX
Working With People From Other Cultures
PPTX
Hugo's Talk at Outsource People Minsk 2016
PPTX
Scrum Crash Course - Arjan Franzen & Hugo Messer
PPTX
Lean startup with a distributed team
a66c4b97ceab4ebcb843ba0f7c99fd0e
Top 10 Benefits Of Agile Methodology
Best Practices For Sourcing In India
Working With People From Other Cultures
Hugo's Talk at Outsource People Minsk 2016
Scrum Crash Course - Arjan Franzen & Hugo Messer
Lean startup with a distributed team

Recently uploaded (20)

PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Cloud computing and distributed systems.
PDF
cuic standard and advanced reporting.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPT
Teaching material agriculture food technology
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Empathic Computing: Creating Shared Understanding
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Big Data Technologies - Introduction.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Machine learning based COVID-19 study performance prediction
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Approach and Philosophy of On baking technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Cloud computing and distributed systems.
cuic standard and advanced reporting.pdf
sap open course for s4hana steps from ECC to s4
Diabetes mellitus diagnosis method based random forest with bat algorithm
Teaching material agriculture food technology
Programs and apps: productivity, graphics, security and other tools
Encapsulation_ Review paper, used for researhc scholars
Empathic Computing: Creating Shared Understanding
“AI and Expert System Decision Support & Business Intelligence Systems”
NewMind AI Weekly Chronicles - August'25 Week I
Big Data Technologies - Introduction.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Spectroscopy.pptx food analysis technology
Reach Out and Touch Someone: Haptics and Empathic Computing
Machine learning based COVID-19 study performance prediction
Dropbox Q2 2025 Financial Results & Investor Presentation
Approach and Philosophy of On baking technology
Per capita expenditure prediction using model stacking based on satellite ima...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

Build your first android mobile app

  • 2. This should be a very short (beginner) introduction/tutorial how to create a mobile app for Android. The tutorial is based on API Level 17 and Android 4.2 (Jelly Bean). Our goal is to start from scratch and have at the end a mp/h to km/h converter.
  • 3. What Do You Need?
  • 4. 1. Basic XML knowledge 2. Basic Java knowledge 3. Basic Eclipse knowledge 4. 2h of your time
  • 6. 1. Before you can start you need the Android SDK and a IDE. Android offers a special bundle for that: Android SDK Bundle 2. Download the bundle, unzip and run the “SDK Manager.exe”. 3. start Eclipse
  • 7. Create An Android Virtual Machine Create An Android Virtual Machine
  • 8. • To run, test and debug your Application you can create and run a virtual android machine on your computer. Later you can deploy your Application to this virtual machine. • Click on “Windows” at the navigation toolbar • Open “Android Virtual Device manager“
  • 9. Create a “New” Virtual Device: Be sure that “Use Host GPU” is enabled. This allows the AVD to use the Host GPU and this helps to render the AVD much faster.
  • 10. After that you can start the AVD:
  • 11. Create a new Project:
  • 12. • Open “File“ • “New“ • “Android Application Project“
  • 13. Choose a new for your Project:
  • 15. Configure Launcher Icon: Here you can choose a Launcher Icon that will be displayed on your mobile phone.
  • 16. Create a new Activity:
  • 18. After finishing Eclipse looks similar to that:
  • 20. Navigate in the package explorer to “/res/layout/” and open “activity_main.xml“ Right-click on “Hello World” and delete
  • 21. Create static Attributes: Select “/res/values/strings.xml“ “Add” a new entry Select the Color entry – press OK and set the following attributes:
  • 22. Add a few more String(!) Attributes: Name/value: “miles” / “to Miles“ Name/value: “kmh” / “to km/h“ Name/value: “calc” / “Calculate“
  • 23. Switch from “Resources” to “strings.xml” and make sure that your code look similar to that snippet:
  • 24. Add Views Select “/res/layout/activity_main.xml“ Open Android editor via double-click You have two possibilities. You can create new Views via drag and drop or you can edit the XML source code. In this tutorial we add the Views via drag and drop So let’s start building our App. At first we have to add a “Text Field” for the input.
  • 25. Drag this Text Field to your Application. Afterwards select the “Form Widget” section and drag a RadioGroupto your App and make sure that the RadioGroup has twoRadioButtons. Finally you can add a normal Button.
  • 26. Switch from “Graphical Layout” to “activity_main.xml” and make sure that your code looks similar to that:
  • 28. Edit view properties You can edit properties of Views via right-click on the view or via XML. Navigate to “res/layout/” and open the Graphical Layout of your “activity_main.xml“ right-click on the first Radio Button and open “Edit Text”
  • 30. • Assign the miles property to the second Radio Button • Set the “Checked” property for the first Radio Button (Other Properties -> inherited from compoundbutton -> checked -> true) • Set the “Input type” property for the Text Field to “numberSigned” and “numberDecimal“ • Assign “calc” to the Button and set “calculate” for the “onClick” property (Other Properties -> inherited from view -> onClick) • Set Background-Color (Right-click on an empty space on your Application -> Edit Background)
  • 31. After that change the Background should be #eeeeee! I think it can be difficult to see the difference.
  • 32. Implement the Logic After we implemented the Frontend-View we have to implement the logical part with Java! Switch to “src/com.example.tutorialapplication/” and open “MainActivity.java“
  • 35. This short but useful tutorial courtesy goes to MARC KLEIN. To know more about technologies log on to http://ekipa.co ! A one stop solution for all your programming needs.