SlideShare a Scribd company logo
1 of 28
Android Programming
Overview
 What is Android?
 Why teach Android?
 What do you need in order to teach Android?
 Hello, Android
Links for android beginners: https://www.udacity.com/courses/android
Andriod Basics: (1) User Interface, (2) Multicscreen Apps, (3) User
Input, (4) Data Storage, (5) Networking
What is Android?
Android
 Includes a Java API for developing applications
 It is not a device or product
The Android Open Source Project
(AOSP)
 An open source Linux-based operating system intended for
mobile computing platforms
 An initiative led by Google
– Makes the source code of the Android OS available for all
Read, review, and modify the code to your liking
 The main goals of the AOSP
– Provide a set of compatibility guidelines—for OEMs (Original
Equipment Manufacturers) and device manufacturers—for
porting Android to custom devices
– Build accessories that comply with Android’s open accessory
standard Allows OEMs and manufacturers to deliver a
standard experience
 Making radical changes to that experience introduces
fragmentation in the marketplace and in competing Android
distributions.
The Open Handset Alliance
 Android, Inc
Created by Andy Rubin, Acquired by Google in 2005.
 Open Handset Alliance (OHA)
– Formed in November 2007
– Business alliance composed of mobile players
• Chip makers
• Handset manufacturers
• Software developers
• Service providers
 OHA began developing open standards based on Android,
Inc. technologies. The result is the Android project.
 Google provided the initial code, online documentation, tools,
forums, and SDK.
Manufacturers: Designing Android
Devices
 Samsung
 Motorola
 Dell
 Sony Ericsson
 HTC
 LG
 Amazon
 Intel
 Texas Instruments
 ARM
 NVIDIA
 Qualcomm
Why teach Android?
Engaging Students with Android
 Android has a lot of “buzz” now
– Newness
– Coolness
– Googleness
 UI and graphics made simple(r)
 Advanced Java skills
What Skills Will Students Learn?
 Reinforce the basics: OOP, decomposition, etc.
 Separation of UI design and functionality
 XML and resource files
 Events and Listeners
 Callback methods
 Threads
Android vs. iPhone
 Java vs. Objective-C
 Direct install vs. Marketplace vs. App Store
 Open source?
What do you need in order
to teach Android?
What Should Students Already Know?
 Java!
– inheritance, method overriding
– interfaces, casting
– exceptions
– debugging
– reading API documentation
 Eclipse
– easy to pick up quickly, though
Do I Need Phones?
 The emulator that is part of the Android toolset for
Eclipse is quite good (though a bit slow)
 You may be able to get free “developer phones”
from Google
Online Resources
 developer.android.com
 code.google.com/p/apps-for-android/
 stackoverflow.com
 videos from Google I/O conferences
“Hello, Android”
Creating Your First(?) Android App
1. Set up your development environment
2. Create a new Android project in Eclipse
3. Run it in the emulator
4. Hilarity ensues
1. Set Up Your Android Environment
 http://developer.android.com/sdk
Install Android Studio with Android SDK
(Android libraries)
 Install JDK if it is not in your computer
 Create AVD (Android virtual device)
2. Create an Android Project
 File → New → Project
 Select “Android Project”
 Fill in Project details...
Name that appears
on device
Directory
name
Class to
automatically
create
Java package
Android
version
Source
code
Auto-generated
code
UI
layout
String
constants
Configuration
3. Run the Android Application
 Run → Run (or click the “Run” button)
 Select “Android Application”
 The emulator may take a few minutes to start, so
be patient!
 You don't need to restart the emulator when you
have a new version of your application
1 public class HelloAndroid extends Activity {
2 /** Called when the activity is first created. */
3 @Override
4 public void onCreate(Bundle savedInstanceState)
5 {
6 super.onCreate(savedInstanceState);
7 setContentView(R.layout.main);
8 }
9 }
HelloAndroid.java
1 <?xml version="1.0" encoding="utf-8"?>
2 <LinearLayout
3 xmlns:android="http://schemas.android.com/apk/res/android"
4 android:orientation="vertical"
5 android:layout_width="fill_parent"
6 android:layout_height="fill_parent"
7 >
8 <TextView
9 android:layout_width="fill_parent"
10 android:layout_height="wrap_content"
11 android:text="@string/hello "
12 />
13 </LinearLayout>
main.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <resources>
3 <string name="hello">Hello World, HelloAndroid!
4 </string>
5 <string name="app_name">Hello, Android</string>
6 </resources>
strings.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <manifest
3 xmlns:android="http://schemas.android.com/apk/res/android"
4 package="edu.upenn.cis542"
5 android:versionCode="1"
6 android:versionName="1.0">
7 <application android:icon="@drawable/icon"
8 android:label="@string/app_name">
9 <activity android:name=".HelloAndroid"
10 android:label="@string/app_name">
11 <intent-filter>
12 <action
13 android:name="android.intent.action.MAIN" />
14 <category
15 android:name="android.intent.category.LAUNCHER"/>
16 </intent-filter>
17 </activity>
18 </application>
19 </manifest>
AndroidManifest.xml

More Related Content

Similar to androidPramming.ppt

Creating Great Apps with MOTODEV Studio for Android
Creating Great Apps with MOTODEV Studio for AndroidCreating Great Apps with MOTODEV Studio for Android
Creating Great Apps with MOTODEV Studio for AndroidMotorola Mobility - MOTODEV
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app developmentAbhishekKumar4779
 
How to become an android developer
How to become an android developerHow to become an android developer
How to become an android developerum_adeveloper
 
Android_Studio_Structure.docx
Android_Studio_Structure.docxAndroid_Studio_Structure.docx
Android_Studio_Structure.docxKNANTHINIMCA
 
Android application developement
Android application developementAndroid application developement
Android application developementSANJAY0830
 
Dload mobile development
Dload mobile developmentDload mobile development
Dload mobile developmentSayed Ahmed
 
Session 1 android overview
Session 1   android overviewSession 1   android overview
Session 1 android overviewAdham Enaya
 
Android Operating System
Android Operating SystemAndroid Operating System
Android Operating SystemBilal Mirza
 
Module-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxModule-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxlancelotlaytan1996
 
Os eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfOs eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfweerabahu
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentIJERD Editor
 
LAP2 iOS and Android Development environment setup
LAP2 iOS and Android Development environment setupLAP2 iOS and Android Development environment setup
LAP2 iOS and Android Development environment setupUniversity of Catania
 
Android and android phones
Android and android phonesAndroid and android phones
Android and android phonesDennise Layague
 
Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi Mumbai
Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi MumbaiIntroduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi Mumbai
Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi MumbaiItvedant
 
Android deep dive
Android deep diveAndroid deep dive
Android deep diveAnuSahniNCI
 

Similar to androidPramming.ppt (20)

Creating Great Apps with MOTODEV Studio for Android
Creating Great Apps with MOTODEV Studio for AndroidCreating Great Apps with MOTODEV Studio for Android
Creating Great Apps with MOTODEV Studio for Android
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
 
Notes Unit2.pptx
Notes Unit2.pptxNotes Unit2.pptx
Notes Unit2.pptx
 
How to become an android developer
How to become an android developerHow to become an android developer
How to become an android developer
 
Android_Studio_Structure.docx
Android_Studio_Structure.docxAndroid_Studio_Structure.docx
Android_Studio_Structure.docx
 
Android application developement
Android application developementAndroid application developement
Android application developement
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Android by LAlitha
Android by LAlithaAndroid by LAlitha
Android by LAlitha
 
Dload mobile development
Dload mobile developmentDload mobile development
Dload mobile development
 
Session 1 android overview
Session 1   android overviewSession 1   android overview
Session 1 android overview
 
Internship presentation
Internship presentationInternship presentation
Internship presentation
 
Android Operating System
Android Operating SystemAndroid Operating System
Android Operating System
 
Module-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxModule-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptx
 
Os eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfOs eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdf
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
LAP2 iOS and Android Development environment setup
LAP2 iOS and Android Development environment setupLAP2 iOS and Android Development environment setup
LAP2 iOS and Android Development environment setup
 
Android and android phones
Android and android phonesAndroid and android phones
Android and android phones
 
Android Programming
Android ProgrammingAndroid Programming
Android Programming
 
Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi Mumbai
Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi MumbaiIntroduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi Mumbai
Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi Mumbai
 
Android deep dive
Android deep diveAndroid deep dive
Android deep dive
 

More from BijayKc16

Bikash K.c..pptx. this is the presentation of brochure.
Bikash K.c..pptx. this is the presentation of brochure.Bikash K.c..pptx. this is the presentation of brochure.
Bikash K.c..pptx. this is the presentation of brochure.BijayKc16
 
eDevelopment.ppt
eDevelopment.ppteDevelopment.ppt
eDevelopment.pptBijayKc16
 
7.1-ProductionManagement.Seals.ppt
7.1-ProductionManagement.Seals.ppt7.1-ProductionManagement.Seals.ppt
7.1-ProductionManagement.Seals.pptBijayKc16
 
OnePageDesigns.ppt
OnePageDesigns.pptOnePageDesigns.ppt
OnePageDesigns.pptBijayKc16
 
social presentation.pptx
social presentation.pptxsocial presentation.pptx
social presentation.pptxBijayKc16
 

More from BijayKc16 (6)

Bikash K.c..pptx. this is the presentation of brochure.
Bikash K.c..pptx. this is the presentation of brochure.Bikash K.c..pptx. this is the presentation of brochure.
Bikash K.c..pptx. this is the presentation of brochure.
 
ch02.ppt
ch02.pptch02.ppt
ch02.ppt
 
eDevelopment.ppt
eDevelopment.ppteDevelopment.ppt
eDevelopment.ppt
 
7.1-ProductionManagement.Seals.ppt
7.1-ProductionManagement.Seals.ppt7.1-ProductionManagement.Seals.ppt
7.1-ProductionManagement.Seals.ppt
 
OnePageDesigns.ppt
OnePageDesigns.pptOnePageDesigns.ppt
OnePageDesigns.ppt
 
social presentation.pptx
social presentation.pptxsocial presentation.pptx
social presentation.pptx
 

Recently uploaded

定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一
定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一
定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一2s3dgmej
 
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607dollysharma2066
 
办理哈珀亚当斯大学学院毕业证书文凭学位证书
办理哈珀亚当斯大学学院毕业证书文凭学位证书办理哈珀亚当斯大学学院毕业证书文凭学位证书
办理哈珀亚当斯大学学院毕业证书文凭学位证书saphesg8
 
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量sehgh15heh
 
Ethics of Animal Research Laika mission.ppt
Ethics of Animal Research Laika mission.pptEthics of Animal Research Laika mission.ppt
Ethics of Animal Research Laika mission.pptShafqatShakeel1
 
Final Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management InternshipFinal Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management InternshipSoham Mondal
 
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证diploma001
 
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改yuu sss
 
tools in IDTelated to first year vtu students is useful where they can refer ...
tools in IDTelated to first year vtu students is useful where they can refer ...tools in IDTelated to first year vtu students is useful where they can refer ...
tools in IDTelated to first year vtu students is useful where they can refer ...vinbld123
 
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...Suhani Kapoor
 
Protection of Children in context of IHL and Counter Terrorism
Protection of Children in context of IHL and  Counter TerrorismProtection of Children in context of IHL and  Counter Terrorism
Protection of Children in context of IHL and Counter TerrorismNilendra Kumar
 
Gray Gold Clean CV Resume2024tod (1).pdf
Gray Gold Clean CV Resume2024tod (1).pdfGray Gold Clean CV Resume2024tod (1).pdf
Gray Gold Clean CV Resume2024tod (1).pdfpadillaangelina0023
 
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一lvtagr7
 
办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一
办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一
办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一A SSS
 
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...Suhani Kapoor
 
Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...
Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...
Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...RegineManuel2
 
MIdterm Review International Trade.pptx review
MIdterm Review International Trade.pptx reviewMIdterm Review International Trade.pptx review
MIdterm Review International Trade.pptx reviewSheldon Byron
 
Application deck- Cyril Caudroy-2024.pdf
Application deck- Cyril Caudroy-2024.pdfApplication deck- Cyril Caudroy-2024.pdf
Application deck- Cyril Caudroy-2024.pdfCyril CAUDROY
 
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证nhjeo1gg
 
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCRdollysharma2066
 

Recently uploaded (20)

定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一
定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一
定制(NYIT毕业证书)美国纽约理工学院毕业证成绩单原版一比一
 
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
 
办理哈珀亚当斯大学学院毕业证书文凭学位证书
办理哈珀亚当斯大学学院毕业证书文凭学位证书办理哈珀亚当斯大学学院毕业证书文凭学位证书
办理哈珀亚当斯大学学院毕业证书文凭学位证书
 
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
 
Ethics of Animal Research Laika mission.ppt
Ethics of Animal Research Laika mission.pptEthics of Animal Research Laika mission.ppt
Ethics of Animal Research Laika mission.ppt
 
Final Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management InternshipFinal Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management Internship
 
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
原版定制卡尔加里大学毕业证(UC毕业证)留信学历认证
 
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
办澳洲詹姆斯库克大学毕业证成绩单pdf电子版制作修改
 
tools in IDTelated to first year vtu students is useful where they can refer ...
tools in IDTelated to first year vtu students is useful where they can refer ...tools in IDTelated to first year vtu students is useful where they can refer ...
tools in IDTelated to first year vtu students is useful where they can refer ...
 
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
 
Protection of Children in context of IHL and Counter Terrorism
Protection of Children in context of IHL and  Counter TerrorismProtection of Children in context of IHL and  Counter Terrorism
Protection of Children in context of IHL and Counter Terrorism
 
Gray Gold Clean CV Resume2024tod (1).pdf
Gray Gold Clean CV Resume2024tod (1).pdfGray Gold Clean CV Resume2024tod (1).pdf
Gray Gold Clean CV Resume2024tod (1).pdf
 
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
 
办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一
办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一
办理学位证(UoM证书)北安普顿大学毕业证成绩单原版一比一
 
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
 
Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...
Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...
Drawing animals and props.pptxDrawing animals and props.pptxDrawing animals a...
 
MIdterm Review International Trade.pptx review
MIdterm Review International Trade.pptx reviewMIdterm Review International Trade.pptx review
MIdterm Review International Trade.pptx review
 
Application deck- Cyril Caudroy-2024.pdf
Application deck- Cyril Caudroy-2024.pdfApplication deck- Cyril Caudroy-2024.pdf
Application deck- Cyril Caudroy-2024.pdf
 
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
 
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Pitampura Delhi NCR
 

androidPramming.ppt

  • 2. Overview  What is Android?  Why teach Android?  What do you need in order to teach Android?  Hello, Android Links for android beginners: https://www.udacity.com/courses/android Andriod Basics: (1) User Interface, (2) Multicscreen Apps, (3) User Input, (4) Data Storage, (5) Networking
  • 4. Android  Includes a Java API for developing applications  It is not a device or product
  • 5. The Android Open Source Project (AOSP)  An open source Linux-based operating system intended for mobile computing platforms  An initiative led by Google – Makes the source code of the Android OS available for all Read, review, and modify the code to your liking  The main goals of the AOSP – Provide a set of compatibility guidelines—for OEMs (Original Equipment Manufacturers) and device manufacturers—for porting Android to custom devices – Build accessories that comply with Android’s open accessory standard Allows OEMs and manufacturers to deliver a standard experience  Making radical changes to that experience introduces fragmentation in the marketplace and in competing Android distributions.
  • 6. The Open Handset Alliance  Android, Inc Created by Andy Rubin, Acquired by Google in 2005.  Open Handset Alliance (OHA) – Formed in November 2007 – Business alliance composed of mobile players • Chip makers • Handset manufacturers • Software developers • Service providers  OHA began developing open standards based on Android, Inc. technologies. The result is the Android project.  Google provided the initial code, online documentation, tools, forums, and SDK.
  • 7. Manufacturers: Designing Android Devices  Samsung  Motorola  Dell  Sony Ericsson  HTC  LG  Amazon  Intel  Texas Instruments  ARM  NVIDIA  Qualcomm
  • 8.
  • 10. Engaging Students with Android  Android has a lot of “buzz” now – Newness – Coolness – Googleness  UI and graphics made simple(r)  Advanced Java skills
  • 11. What Skills Will Students Learn?  Reinforce the basics: OOP, decomposition, etc.  Separation of UI design and functionality  XML and resource files  Events and Listeners  Callback methods  Threads
  • 12. Android vs. iPhone  Java vs. Objective-C  Direct install vs. Marketplace vs. App Store  Open source?
  • 13. What do you need in order to teach Android?
  • 14. What Should Students Already Know?  Java! – inheritance, method overriding – interfaces, casting – exceptions – debugging – reading API documentation  Eclipse – easy to pick up quickly, though
  • 15. Do I Need Phones?  The emulator that is part of the Android toolset for Eclipse is quite good (though a bit slow)  You may be able to get free “developer phones” from Google
  • 16. Online Resources  developer.android.com  code.google.com/p/apps-for-android/  stackoverflow.com  videos from Google I/O conferences
  • 18. Creating Your First(?) Android App 1. Set up your development environment 2. Create a new Android project in Eclipse 3. Run it in the emulator 4. Hilarity ensues
  • 19. 1. Set Up Your Android Environment  http://developer.android.com/sdk Install Android Studio with Android SDK (Android libraries)  Install JDK if it is not in your computer  Create AVD (Android virtual device)
  • 20. 2. Create an Android Project  File → New → Project  Select “Android Project”  Fill in Project details...
  • 21. Name that appears on device Directory name Class to automatically create Java package Android version
  • 23. 3. Run the Android Application  Run → Run (or click the “Run” button)  Select “Android Application”  The emulator may take a few minutes to start, so be patient!  You don't need to restart the emulator when you have a new version of your application
  • 24.
  • 25. 1 public class HelloAndroid extends Activity { 2 /** Called when the activity is first created. */ 3 @Override 4 public void onCreate(Bundle savedInstanceState) 5 { 6 super.onCreate(savedInstanceState); 7 setContentView(R.layout.main); 8 } 9 } HelloAndroid.java
  • 26. 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout 3 xmlns:android="http://schemas.android.com/apk/res/android" 4 android:orientation="vertical" 5 android:layout_width="fill_parent" 6 android:layout_height="fill_parent" 7 > 8 <TextView 9 android:layout_width="fill_parent" 10 android:layout_height="wrap_content" 11 android:text="@string/hello " 12 /> 13 </LinearLayout> main.xml
  • 27. 1 <?xml version="1.0" encoding="utf-8"?> 2 <resources> 3 <string name="hello">Hello World, HelloAndroid! 4 </string> 5 <string name="app_name">Hello, Android</string> 6 </resources> strings.xml
  • 28. 1 <?xml version="1.0" encoding="utf-8"?> 2 <manifest 3 xmlns:android="http://schemas.android.com/apk/res/android" 4 package="edu.upenn.cis542" 5 android:versionCode="1" 6 android:versionName="1.0"> 7 <application android:icon="@drawable/icon" 8 android:label="@string/app_name"> 9 <activity android:name=".HelloAndroid" 10 android:label="@string/app_name"> 11 <intent-filter> 12 <action 13 android:name="android.intent.action.MAIN" /> 14 <category 15 android:name="android.intent.category.LAUNCHER"/> 16 </intent-filter> 17 </activity> 18 </application> 19 </manifest> AndroidManifest.xml