7. What is Android?
Application framework
Dalvik VM
Integrated browser based on WebKit
Optimized Graphics (skia for 2D and OpenGL ES for
3D)
8. What is Android?
Application framework
Dalvik VM
Integrated browser based on WebKit
Optimized Graphics (skia for 2D and OpenGL ES for
3D)
SQLite
9. What is Android?
Application framework
Dalvik VM
Integrated browser based on WebKit
Optimized Graphics (skia for 2D and OpenGL ES for
3D)
SQLite
Media Support
10. What is Android?
Application framework
Dalvik VM
Integrated browser based on WebKit
Optimized Graphics (skia for 2D and OpenGL ES for
3D)
SQLite
Media Support
14. What is Android?
GSM Telephony
Bluetooth, EDGE, 3G and WIFI
Camera, GPS, compass and accelerometer
15. What is Android?
GSM Telephony
Bluetooth, EDGE, 3G and WIFI
Camera, GPS, compass and accelerometer
Rich Development Environment
16. Why Android?
• Statistics as of November 2011
• 200 million Android activations!
• Google Music Event (11/16/11)
• AppBrain Market Stats
• Google Phones List
17. Why Android?
200 million devices worldwide
• Statistics as of November 2011
• 200 million Android activations!
• Google Music Event (11/16/11)
• AppBrain Market Stats
• Google Phones List
18. Why Android?
200 million devices worldwide
6 billion downloads in Android Market
• Statistics as of November 2011
• 200 million Android activations!
• Google Music Event (11/16/11)
• AppBrain Market Stats
• Google Phones List
19. Why Android?
200 million devices worldwide
6 billion downloads in Android Market
550,000 activations per day
• Statistics as of November 2011
• 200 million Android activations!
• Google Music Event (11/16/11)
• AppBrain Market Stats
• Google Phones List
20. Why Android?
200 million devices worldwide
6 billion downloads in Android Market
550,000 activations per day
329,846 apps in the Android Market
• Statistics as of November 2011
• 200 million Android activations!
• Google Music Event (11/16/11)
• AppBrain Market Stats
• Google Phones List
21. Why Android?
200 million devices worldwide
6 billion downloads in Android Market
550,000 activations per day
329,846 apps in the Android Market
171 devices from 17 manufacturers
• Statistics as of November 2011
• 200 million Android activations!
• Google Music Event (11/16/11)
• AppBrain Market Stats
• Google Phones List
22. Top Mobile OEMs (US)
July 2011
Samsung 25.5%
LG 20.9%
Motorola 14.1%
Apple 9.5%
RIM 7.6%
http://www.comscore.com/Press_Events/Press_Releases/2011/8/comScore_Reports_July_2011_U.S._Mobile_Subscriber_Market_Share
23. Top Smartphone Platforms
July 2011
Google 41.8%
Apple 27.0%
RIM 21.7%
Microsoft 5.7%
Symbian 1.9%
http://www.comscore.com/Press_Events/Press_Releases/2011/8/comScore_Reports_July_2011_U.S._Mobile_Subscriber_Market_Share
35. Emulator
Mimics most of the hardware
and software features of a
mobile device
Can simulate application
interrupts such as incoming
SMS or phone calls
36. Emulator
Mimics most of the hardware
and software features of a
mobile device
Can simulate application
interrupts such as incoming
SMS or phone calls
Simulate GPS location fix
41. Emulator Limitations
Placing or receiving phone calls
USB connections
Camera / Video Capture (input)
Determining Connected State
42. Emulator Limitations
Placing or receiving phone calls
USB connections
Camera / Video Capture (input)
Determining Connected State
Determining Battery charge level and AC
charging state
43. Emulator Limitations
Placing or receiving phone calls
USB connections
Camera / Video Capture (input)
Determining Connected State
Determining Battery charge level and AC
charging state
Unable to listen for SD Card insert/eject
44. Emulator Limitations
Placing or receiving phone calls
USB connections
Camera / Video Capture (input)
Determining Connected State
Determining Battery charge level and AC
charging state
Unable to listen for SD Card insert/eject
Bluetooth
45. Emulator Limitations
Placing or receiving phone calls
USB connections
Camera / Video Capture (input)
Determining Connected State
Determining Battery charge level and AC
charging state
Unable to listen for SD Card insert/eject
Bluetooth
Accelerometer
49. Application structure
/src/ - location for all your java files
/gen/ - autogenerated file R.java
/assets/ - fonts, audio files and other compressed files
50. Application structure
/src/ - location for all your java files
/gen/ - autogenerated file R.java
/assets/ - fonts, audio files and other compressed files
/bin/ - target directory to store the dex file and the APK
51. Application structure
/src/ - location for all your java files
/gen/ - autogenerated file R.java
/assets/ - fonts, audio files and other compressed files
/bin/ - target directory to store the dex file and the APK
/res/ - drawables, layouts and strings
52. Application structure
/src/ - location for all your java files
/gen/ - autogenerated file R.java
/assets/ - fonts, audio files and other compressed files
/bin/ - target directory to store the dex file and the APK
/res/ - drawables, layouts and strings
AndroidManifest.xml - tells a lot of things about your
application
53. Application structure
/src/ - location for all your java files
/gen/ - autogenerated file R.java
/assets/ - fonts, audio files and other compressed files
/bin/ - target directory to store the dex file and the APK
/res/ - drawables, layouts and strings
AndroidManifest.xml - tells a lot of things about your
application
proguard.cfg - configuration file for source code
obfuscation
63. Activity
package com.mlst.hellogtug;
import android.app.Activity;
import android.os.Bundle;
public class Main extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
64. Activity
package com.mlst.hellogtug;
import android.app.Activity;
import android.os.Bundle;
public class Main extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
65. Activity
package com.mlst.hellogtug;
import android.app.Activity;
import android.os.Bundle;
public class Main extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
66. Activity
package com.mlst.hellogtug;
import android.app.Activity;
import android.os.Bundle;
public class Main extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
78. Running your application
1. Launch the emulator
2. Install the application using ADB or Android Debug
Bridge (adb install application.apk)
79. Running your application
1. Launch the emulator
2. Install the application using ADB or Android Debug
Bridge (adb install application.apk)
3. Monitor the logs by using Android Debug Bridge (adb
logcat or adb lolcat - adds more fun)
80. Running your application
1. Launch the emulator
2. Install the application using ADB or Android Debug
Bridge (adb install application.apk)
3. Monitor the logs by using Android Debug Bridge (adb
logcat or adb lolcat - adds more fun)
4.Modify code then repeat #2
81. Debugging your App
Window > Open Perspective > DDMS
Select the application to debug in Devices section
Click the green bug icon at the toolbar
Set your breakpoints