SlideShare una empresa de Scribd logo
1 de 35
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:
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”
• 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“
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.

Más contenido relacionado

La actualidad más candente

Simulate App User Experience Axure Mobile Prototype Android
Simulate App User Experience Axure Mobile Prototype AndroidSimulate App User Experience Axure Mobile Prototype Android
Simulate App User Experience Axure Mobile Prototype Android
James Orior
 
"Discover windows phone" 05. Application Bar
"Discover windows phone" 05. Application Bar"Discover windows phone" 05. Application Bar
"Discover windows phone" 05. Application Bar
Yasmine Abdelhady
 
2.5 clock, desktop, and dictionary objects
2.5   clock, desktop, and dictionary objects2.5   clock, desktop, and dictionary objects
2.5 clock, desktop, and dictionary objects
allenbailey
 
3.4 events and interactivity
3.4   events and interactivity3.4   events and interactivity
3.4 events and interactivity
allenbailey
 

La actualidad más candente (20)

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

Destacado

Programming language (JGMNHS)
Programming language (JGMNHS)Programming language (JGMNHS)
Programming language (JGMNHS)
Katherine Gamboa
 

Destacado (12)

Máy hút ẩm fujie hm 630 eb
Máy hút ẩm fujie hm 630 ebMáy hút ẩm fujie hm 630 eb
Máy hút ẩm fujie hm 630 eb
 
EARnew NY
EARnew NYEARnew NY
EARnew NY
 
Samir Ngirim Doa
Samir Ngirim DoaSamir Ngirim Doa
Samir Ngirim Doa
 
JAVA PROGRAMS
JAVA PROGRAMSJAVA PROGRAMS
JAVA PROGRAMS
 
GUI JAVA PROG ~hmftj
GUI  JAVA PROG ~hmftjGUI  JAVA PROG ~hmftj
GUI JAVA PROG ~hmftj
 
Baabtra.com little coder chapter - 1
Baabtra.com little coder   chapter - 1Baabtra.com little coder   chapter - 1
Baabtra.com little coder chapter - 1
 
Basic Essay Style
Basic Essay StyleBasic Essay Style
Basic Essay Style
 
Android Training For Beginner @DILO Bandung
Android Training For Beginner @DILO BandungAndroid Training For Beginner @DILO Bandung
Android Training For Beginner @DILO Bandung
 
ES-318: Computer As Educational Aids
ES-318: Computer As Educational AidsES-318: Computer As Educational Aids
ES-318: Computer As Educational Aids
 
PJP-Introduction
PJP-IntroductionPJP-Introduction
PJP-Introduction
 
Computer assissted instructions (cai)
Computer assissted instructions (cai)Computer assissted instructions (cai)
Computer assissted instructions (cai)
 
Programming language (JGMNHS)
Programming language (JGMNHS)Programming language (JGMNHS)
Programming language (JGMNHS)
 

Similar a Build your first android mobile app

Coding Lesson (iOS for non-developers) by Zakery Kline and Roger Kerse
Coding Lesson (iOS for non-developers) by Zakery Kline and Roger KerseCoding Lesson (iOS for non-developers) by Zakery Kline and Roger Kerse
Coding Lesson (iOS for non-developers) by Zakery Kline and Roger Kerse
European Innovation Academy
 

Similar a Build your first android mobile app (20)

Mobile Worshop Lab guide
Mobile Worshop Lab guideMobile Worshop Lab guide
Mobile Worshop Lab guide
 
Intro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twist
Intro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twistIntro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twist
Intro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twist
 
Project anatomy & hello world
Project anatomy & hello worldProject anatomy & hello world
Project anatomy & hello world
 
Android development module
Android development moduleAndroid development module
Android development module
 
Ap quiz app
Ap quiz appAp quiz app
Ap quiz app
 
Laboratorio: Desarrollo para Smart Devices (continuación)
Laboratorio: Desarrollo para Smart Devices (continuación)Laboratorio: Desarrollo para Smart Devices (continuación)
Laboratorio: Desarrollo para Smart Devices (continuación)
 
Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6
 
Introduction to Android and Java.pptx
Introduction to Android and Java.pptxIntroduction to Android and Java.pptx
Introduction to Android and Java.pptx
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
 
Android software development – the first few hours
Android software development – the first few hoursAndroid software development – the first few hours
Android software development – the first few hours
 
Coding Lesson (iOS for non-developers) by Zakery Kline and Roger Kerse
Coding Lesson (iOS for non-developers) by Zakery Kline and Roger KerseCoding Lesson (iOS for non-developers) by Zakery Kline and Roger Kerse
Coding Lesson (iOS for non-developers) by Zakery Kline and Roger Kerse
 
Containers Lab
Containers Lab Containers Lab
Containers Lab
 
Android course (lecture2)
Android course (lecture2)Android course (lecture2)
Android course (lecture2)
 
Getting started with android studio
Getting started with android studioGetting started with android studio
Getting started with android studio
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
 
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
 
Titanium Appcelerator - Beginners
Titanium Appcelerator - BeginnersTitanium Appcelerator - Beginners
Titanium Appcelerator - Beginners
 
Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4
 
Android app development guide for freshers by ace web academy
Android app development guide for freshers  by ace web academyAndroid app development guide for freshers  by ace web academy
Android app development guide for freshers by ace web academy
 
Getting Enter in Android development
Getting Enter in Android developmentGetting Enter in Android development
Getting Enter in Android development
 

Más de ekipaco (7)

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

Último

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

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:
  • 27.
  • 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”
  • 29.
  • 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“
  • 33.
  • 34.
  • 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.