Introduction to Android Development: Before Getting Started
-
Upload
ahsanul-karim -
Category
Technology
-
view
4.026 -
download
7
Transcript of Introduction to Android Development: Before Getting Started
![Page 1: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/1.jpg)
Android Application DevelopmentSeminar on Getting Started
Ahsanul Karim [email protected]
Sentinel Solutions Ltd.http://www.sentinelbd.com
http://androidstream.wordpress.comEngineering Students Association of Bangladesh (ESAB)
![Page 2: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/2.jpg)
Before Introduction
![Page 3: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/3.jpg)
Before Introduction: Your Suggestions1. Monotonous discussion should be banned
But, let me try… after all it’s a free seminar. No one’s going to kill me….
![Page 4: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/4.jpg)
Before Introduction: Your Suggestions2. This could be the first phase and it should be continued.3. Arranging a workshop is better than seminar for the novice.
We have following probable plans:
1. Workshops2. Training Programs 3. Onsite Contests with help from experienced Developers4. Idea-based Contests with help from experienced Developers5. Jamming Events
Depends on your feedback
![Page 5: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/5.jpg)
Before Introduction: Your Suggestions4. You can emphasize on learning OOPs before starting session on Android. Because very large number of Software Developer have no clear concept on OOP.
OOP concept is indispensable. But we have to learn in parallel.
5. It might get a little more interesting if the attendants are allowed to have the opportunity to play or use some of the android apps themselves.
Can you suggest how can we do that? May be next time we’ll try.We may review some good apps today.
![Page 6: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/6.jpg)
Before Introduction: Your Suggestions6. If you give us some knowledge regarding to developing android software and how to post them in the android market it can be helpful to us in the future.
We’ll do that in this session
7. You can give us some video about mobile application programming which can help us.
We’ll provide you complete course content with video tutorials we did in BASIS (Bangladesh Association of Software & Information Services)
![Page 7: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/7.jpg)
Before Introduction: Your Suggestions8. Consider all type of audience.
Excellent suggestion. We’ll try that
9. Discuss from technological perspective as well as business.Excellent suggestion. We’ll try that
10. Forecast about near future associated with Android.
Excellent suggestion. We’ll try that
![Page 8: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/8.jpg)
So Today…
1. Get Basic Idea on Mobile and Smartphone Applications2. Get Basic Idea on Mobile, Smartphone & Tablet Platforms3. Identify the Position of Android Platform4. Background and History of Android5. Get the Idea: Why Should We Learn Android Platform6. Opportunities7. Some App Demos8. System Architecture9. Environment Setup to Kick-start10. Application Structure11. Cross-platform development12. Resources
![Page 9: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/9.jpg)
Mobile and Smartphone ApplicationsMobile Phones
A mobile phone (also called mobile, cellular telephone, cell phone, or hand phone is an electronic device used to make
1. Calls across a wide geographic area. 2. Send Text SMS3. Can see call records4. Can capture image 5. Can run music 6. Can browse web etc.
To learn about mobile phones in details: http://en.wikipedia.org/wiki/Mobile_phone
You’ll get detailed history about how this technology evolved over the years
![Page 10: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/10.jpg)
Mobile and Smartphone ApplicationsMobile Phone Applications: Some ExamplesCategory: Utility ToolsPersonal Finance Calculator
Another example can be: Daily Planner ApplicationPossible Features:1. Task List2. Reminder3. Appointment etc.
![Page 11: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/11.jpg)
Mobile and Smartphone ApplicationsMobile Phone Applications: Some Examples (Contd.)Category: GamesSudoku Tetris Snake
![Page 12: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/12.jpg)
Mobile and Smartphone ApplicationsMobile Phone Applications: Development
1. Different Mobile phone vendor companies use different platforms for developing applications for their own platform.
2. We’ll discuss about a open “Legacy” platform as an example which is J2ME
Java Platform, Micro Edition, or Java ME: 1. It is a Java platform designed for embedded systems (mobile
Devices are one kind of such systems) . 2. Target devices range from industrial controls to mobile phones
with Java (KVM support). Formerly known as Java 2 Platform, Micro Edition (J2ME).For details:http://en.wikipedia.org/wiki/Java_Platform,_Micro_Edition
Nokia, Samsung, Sony Ericsson and many other vendors supports J2ME for applications and games development
![Page 13: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/13.jpg)
Mobile and Smartphone ApplicationsMobile Phone Applications: Development With J2MELimitations1. Memory Issues
1. Vendor Specific Implementation2. Insufficient Memory3. Inefficient Memory Management
2. Device Compatibility Issues3. Not enough Access to Core System of the Phone4. Vendor Specific Implementation of KVM
That is why…We see sites like this:
![Page 14: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/14.jpg)
Mobile and Smartphone ApplicationsSmart Phones
1. A smartphone is a mobile phone that offers more advanced computing ability, Features and connectivity than a contemporary mobile phones.
2. Smartphones may be thought of as handheld computers integrated with a mobile telephone.
3. They also provide their own Operating System with Application Development Framework
To learn about smart phones in details: http://en.wikipedia.org/wiki/Smartphone
You’ll get detailed history about how this technology evolved over the years
![Page 15: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/15.jpg)
Mobile and Smartphone ApplicationsSmart Phones Platforms
Android iPhone Palm PreBlackBerry
![Page 16: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/16.jpg)
Mobile and Smartphone ApplicationsTablet Platforms
Android: Galaxy Tab Apple: iPad
![Page 17: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/17.jpg)
Overview of Application Platforms (alphabetically)
Platform Language (s) RemarksAndroid Java, C, C++ Open Source OS (Based on Linux)
http://developer.android.com
bada C, C++ Samsung’s mobile platform running on Linux or RealTime OShttp://developer.bada.com
BlackBerry Java, Web Apps Java, Web Apps, Java ME compatible, extensions enable tighter integrationhttp://na.blackberry.com/eng/developers
iOS Objective-C, C Requires Apple Developer Accounthttp://developer.apple.com/iphone
MeeGo Qt, C++, others Intel and Nokia guided open source OS (based on Linux)http://meego.com/developers
Symbian C, C++, Java, Qt, Web Apps, others
OS built from the ground up for mobile deviceshttp://www.forum.nokia.com/symbian
![Page 18: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/18.jpg)
Overview of Application Platforms (Cont.)
Platform Language (s) RemarkswebOS HTML, CSS,
JavaScript, CSupports widget style programming (based on Linux)http://developer.palm.com
Windows Mobile
C#, C .NET CF or Windows Mobile API, most devices ship with Java ME compatible JVMhttp://developer.windowsmobile.com
Windows Phone
C#, VB.NET Silverlight, XNA Frameworkshttp://create.msdn.com
Source: http://mobileplatforms.wikidot.com/
![Page 19: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/19.jpg)
Application Platforms
![Page 20: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/20.jpg)
Why AndroidThey say a picture is worth a thousand words!!
![Page 21: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/21.jpg)
Why Android (Cont.)They say a picture is worth a thousand words!!
![Page 22: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/22.jpg)
Why Android (Cont.)
![Page 23: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/23.jpg)
Why Android (Cont.)
![Page 24: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/24.jpg)
Why Android (Cont.)
![Page 25: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/25.jpg)
Why Android (Cont.)
![Page 26: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/26.jpg)
Why Android (Cont.)
![Page 27: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/27.jpg)
Why Android (Cont.)
![Page 28: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/28.jpg)
Why Android: Google TV
![Page 29: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/29.jpg)
Why Android: Finally BlackBerry Gives In
![Page 30: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/30.jpg)
Open Handset Alliance (Nov 2007)Manufacturers: Designing the Android Handsets
Content Providers: Developing Apps Mobile Operators
Markets: Distribution
![Page 31: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/31.jpg)
Why Android (Cont.)
What about ASIA-Pacific region???
Low cost devices from China manufacturers… $96 Android devices
![Page 32: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/32.jpg)
Why Android (Cont.)Technical Advantages
No need to pay for any developer’s program to develop and test apps in real devices
Open source platform with scope of more innovation (Less proprietary restrictions)
Java programming language
Rich and easy to integrate feature sets
Easy, effective and cost-effective prototyping for research and business
Development Environment Support in Windows, Mac & Linux (Ubuntu)
Imagination is the Limit
![Page 33: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/33.jpg)
Why Android (Cont.)Business Advantages
Android market: Integrated market appOne time low registration fee
Many Distribution Channels:(We’ll see next)
Low Barrier to Market:No approval processLess restrictions with copyright issues
![Page 34: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/34.jpg)
Why Android (Cont.)Opportunities
Android market: (http://market.android.com)Integrated Android Market Application in phones can ensure your reach to
millions of users without any approval process.
Amazon Appstore for Android: http://www.amazon.com/mobile-apps/b?ie=UTF8&node=2350149011
Enterprise Market:https://marketplace.cisco.com/
3rd Party Distribution Channels :1. Andspot 2. Handango 3. GetJar 4. SlideMe 5.AndAppStore6. AndroLib 7. AppBrain and many more…
![Page 35: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/35.jpg)
Why Android (Cont.)Opportunities
Android Market: (1) Analytics to help decision making
![Page 36: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/36.jpg)
Why Android (Cont.)Opportunities
Android Market: (2) Crash log to support bug fixes
![Page 37: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/37.jpg)
Why Android (Cont.)Opportunities
Android Market: (3) Requirements
![Page 38: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/38.jpg)
Why Android (Cont.)Opportunities
Amazon Appstore for Android:
![Page 39: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/39.jpg)
Why Android (Cont.)Opportunities
Enterprise Market:
$ $ $ $ $ $ $
![Page 40: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/40.jpg)
Why Android (Cont.)Monetization Opportunities
Paid Apps $ $ $ $ $ $ $ In-App Billing Free Apps with Ads
AdMob AdWhirl Mobclix and many more
![Page 41: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/41.jpg)
Freelancing Opportunities
Statistics Source: http://www.elance.com/android-programmers-freelancers/230
Similar trend is seen in other freelancing sites
Why Android (Cont.)
Can be a good source of income to support your own product development or research
![Page 42: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/42.jpg)
Game Development OpportunitiesWhy Android (Cont.)
Case Study: AhhhPah http://ahhhpah.com/
Simplified Game frameworks1. Libgdx: http://code.google.com/p/libgdx/2. AndEngine: http://www.andengine.org/3. Unity3d: http://unity3d.com/
Development Time: 8 hoursDownloads: millions
![Page 43: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/43.jpg)
Some Interesting AppsWhy Android (Cont.)
ShazamHear a song you don't know? Shazam identifies it instantly.
INSTALLS:10,000,000 - 50,000,000
![Page 44: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/44.jpg)
Some Interesting AppsWhy Android (Cont.)
Guitar : Solo LiteINSTALLS:10,000,000 - 50,000,000
![Page 45: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/45.jpg)
My StoryWhy Android (Cont.)
ProTranslate INSTALLS: 50,000 - 100,000
Features:1. Support for wide range of
languages2. Share translated text
(Email,SMS,twitter,facebook)Pronounciation and speech output
3. Website translationDocument translation and share via email
4. Auto-prompt to translate SMS received
5. Optimized for all Android devices
It gave us Google’s Device Seeding Program Award
![Page 46: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/46.jpg)
My StoryWhy Android (Cont.)
ProTranslate
![Page 47: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/47.jpg)
Research OpportunitiesWhy Android (Cont.)
Easy Prototyping of any idea is possible in Android. Some of the advanced research based projects are prototyped in Android.
mHealth
Developed by the Johns Hopkins Center for Clinical Global Health Education, eMOCHA uses video, audio, touchscreen quizzes, GPS and SMS to collect and analyze large amounts of data.
eMOCA (www.emocha.org)
![Page 48: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/48.jpg)
Research OpportunitiesWhy Android (Cont.)
Easy Prototyping of any idea is possible in Android. Some of the advanced research based projects are prototyped in Android.
mHealth
Developed by ClickDiagnostics, uses video, audio, touchscreen Quizzes to upload data to server to reach the consultants.
ClickDiagnosticshttp://clickdiagnostics.com/
![Page 49: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/49.jpg)
Research OpportunitiesWhy Android (Cont.)
mHealth
Clinical diagnosis + Data acquisition
![Page 50: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/50.jpg)
Research OpportunitiesWhy Android (Cont.)
Android + Arduino = Innovation UnlimitedArduino (http://www.arduino.cc/)
1. Arduino is an open-source electronics prototyping platform2. can sense the environment by receiving input from a variety of sensors and can affect its
surroundings by controlling lights, motors, and other actuators.
http://arduino.cc/blog/2011/10/12/android-open-2011-massimo-banzi-arduino-android-infinite-possibilities/
![Page 51: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/51.jpg)
Research OpportunitiesWhy Android (Cont.)
Android in Disaster Management
A Mobile Disaster Management System Using the Android Technologyhttp://www.naun.org/journals/communications/19-280.pdf
Implementation of an Android based disaster management systemhttp://www.bcdph.com/download/android.pdf
Android Incident Reporting for SAHANA Disaster Management Systemhttp://code.google.com/p/sahana-incident-reporter/
Case Study: Bangladesh Army
1. Custom sensor device to accumulate weather data2. Create forecast3. Use data feeds to plan strategies for recovery4. Integrated solar cell for self sufficient power
![Page 52: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/52.jpg)
Application Development OpportunitiesWhy Android (Cont.)
Augmented Reality
Some more: http://techsplurge.com/3214/mega-list-33-awesome-augmented-reality-apps-games-android/
Real World Environment+ Sound, Video, Graphics data generated by systems= AR
![Page 53: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/53.jpg)
Research OpportunitiesWhy Android (Cont.)
Android in Space!!!
http://www.youtube.com/watch?v=REsEgrhmMjc
![Page 54: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/54.jpg)
Android is a software stack for mobile devices that includes an
operating system, middleware and key applications. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.
What is Android
Google describes Android as:The first truly open and comprehensive platform for mobile devices, all of the software to run a mobile phone but without the proprietary obstacles that have hindered mobile innovation.
![Page 55: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/55.jpg)
Android Features
Features1. Application framework2. Dalvik virtual machine 3. Integrated browser4. Optimized graphics 5. SQLite Storage6. Media support 7. GSM Telephony 8. Bluetooth, EDGE, 3G, and WiFi 9. Camera, GPS, compass, and accelerometer 10.Rich development environment
![Page 56: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/56.jpg)
Android Features (Cont.)
Light Sensor
Thermal Sensor
Gyroscope
Accelerometer
Magnetic Sensor
GPS
Your AppWith logic to
Actuate+ =
TTSVoice Search
![Page 57: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/57.jpg)
Android Architecture
![Page 58: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/58.jpg)
System RequirementsSetting up Development Environment
Supported OS1. Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7
(32- or 64-bit)2. Mac OS X 10.5.8 or later (x86 only)3. Linux (tested on Ubuntu Linux, Lucid Lynx)
Supported Development Environment (Eclipse IDE based)1. Eclipse 3.4 (Ganymede) or greater/Eclipse Classic (versions
3.5.1 and higher)2. JDK 1.5 or 1.63. ADT Plugin
![Page 59: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/59.jpg)
To set up the development environment, we need:1. Java Development Kit (JDK 1.5+, 1.6 is preferable)2. Eclipse IDE3. Android SDK
Setting up Development Environment(Contd.)
![Page 60: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/60.jpg)
Java Development Kit (JDK)
Setting up Development Environment (Contd.)
Download Link: http://www.java.com/en/download/index.jsp
Download JDK from here and Install JDK
![Page 61: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/61.jpg)
Eclipse IDE
Setting up Development Environment (Contd.)
Download Link: http://eclipse.org/downloads/
Download the highlighted version of Eclipse IDE
![Page 62: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/62.jpg)
Android SDK
Setting up Development Environment (Contd.)
Link: http://developer.android.com/sdk/index.html
Download and Install the SDK starter package from the table above (Highlighted)
![Page 63: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/63.jpg)
Android SDK Setup (1)
Setting up Development Environment (Contd.)
1. Install available packages to get all SDK platform versions
![Page 64: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/64.jpg)
Android SDK Setup (2)
Setting up Development Environment (Contd.)
2. Installation progress
![Page 65: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/65.jpg)
Android SDK Setup (3)
Setting up Development Environment (Contd.)
3. ADT Plugin for Eclipse
ADT Plugin: Android Development Tools (ADT) is a plugin for the Eclipse IDE for
1. extending the capabilities of Eclipse to set up new Android projects2. creating an application UI3. adding components based on the Android Framework API4. debugging your applications using the Android SDK tools5. exporting signed (or unsigned) APKs in order to distribute your application
We’ll see the 5 points gradually during development
![Page 66: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/66.jpg)
Android SDK Setup (4)
Setting up Development Environment (Contd.)
4. Installing the ADT
1. Start Eclipse, then select Help > Install New Software....
2. Click Add, in the top-right corner.
3. In the next window, you'll see a list of the tools to be downloaded. Click Next.
4. Read and accept the license agreements, then click Finish.
5. When the installation completes, restart Eclipse.
![Page 67: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/67.jpg)
Android SDK Setup (5)
Setting up Development Environment (Contd.)
5. Set SDK path
1. Start Eclipse, then select Window > Preferences
2. Browse and show the path of Android SDK.
3. Press Apply and OK.
Development Environment Setup is now completed!
![Page 68: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/68.jpg)
Setting up Development Environment (Contd.)In Our Lab (1)In our D:// Drive we get:
![Page 69: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/69.jpg)
Setting up Development Environment (Contd.)In Our Lab (2)First we install JDK
We have already done that
![Page 70: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/70.jpg)
Setting up Development Environment (Contd.)In Our Lab (3.1)We’ll setup Eclipse Galileo
![Page 71: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/71.jpg)
Setting up Development Environment (Contd.)In Our Lab (3.2)We’ll setup Eclipse Galileo
You can create a shortcut in the desktop for eclipse.exe
![Page 72: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/72.jpg)
Setting up Development Environment (Contd.)In Our Lab (3.3)We’ll setup Eclipse Galileo
Choose your WorkSpace
![Page 73: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/73.jpg)
Setting up Development Environment (Contd.)In Our Lab (3.5)We’ll setup Eclipse Galileo
You have already seen this for previous case HeliosExpecting a question
![Page 74: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/74.jpg)
Setting up Development Environment (Contd.)In Our Lab (3.6)We’ll setup Eclipse Galileo
We’ll become familiar to our new IDE gradually and I swear you’ll start loving it
![Page 75: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/75.jpg)
Setting up Development Environment (Contd.)In Our Lab (4.1)We’ll setup ADT Plugin
![Page 76: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/76.jpg)
Setting up Development Environment (Contd.)In Our Lab (4.2)We’ll setup ADT Plugin
![Page 77: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/77.jpg)
Setting up Development Environment (Contd.)In Our Lab (4.3)We’ll setup ADT Plugin
![Page 78: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/78.jpg)
Setting up Development Environment (Contd.)In Our Lab (4.4)We’ll setup ADT Plugin
![Page 79: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/79.jpg)
Setting up Development Environment (Contd.)In Our Lab (4.5)We’ll setup ADT Plugin
![Page 80: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/80.jpg)
Setting up Development Environment (Contd.)In Our Lab (4.6)We’ll setup ADT Plugin
![Page 81: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/81.jpg)
Setting up Development Environment (Contd.)In Our Lab (4.7)We’ll setup ADT Plugin
Adding ADT Pluging is DONE… You’ll now get a message
![Page 82: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/82.jpg)
Setting up Development Environment (Contd.)In Our Lab (5.1)We’ll setup android SDK
After restarting Eclipse we get:
Don’t forget to ask me about the red marks
![Page 83: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/83.jpg)
Setting up Development Environment (Contd.)In Our Lab (5.2)We’ll setup android SDK
SDK and AVD Manager: If we click on it:
So, we have to set the location of Android SDK and show it to our IDE
To do so….
![Page 84: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/84.jpg)
Setting up Development Environment (Contd.)In Our Lab (5.3)We’ll setup android SDK
![Page 85: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/85.jpg)
Setting up Development Environment (Contd.)In Our Lab (5.4)We’ll setup android SDK
![Page 86: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/86.jpg)
Setting up Development Environment (Contd.)In Our Lab (5.5)We’ll setup android SDK
![Page 87: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/87.jpg)
Setting up Development Environment (Contd.)In Our Lab (5.6)We’ll setup android SDK
![Page 88: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/88.jpg)
Setting up Development Environment (Contd.)In Our Lab (5.6)We’ll setup DDMS
Now We are Ready
![Page 89: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/89.jpg)
Let’s say “Hello” to the Android World!
In the subsequent slides: 1. We’ll create an application step
by step using the help of IDE and ADT.
2. We’ll then explain application structure and identify the building blocks.
3. We’ll experiment with components and learn to convert our innovative ideas into neat apps.
Now that our development environment is ready, we’ll build our first Android application.
![Page 90: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/90.jpg)
Let’s say “Hello” to the Android World! (Contd.)1. Start Eclipse and Go to File>New>Android Project
2. We keep project name “Hello World” (Since 1970 Ritchie’s book on C programming, programmers always say Hello World first)3. Build Target “Android1.6”4. Application name: “Hello World”5. Package name: com.sentinelbd.hallo6. Initial Activity Name: HalloActivity7. Min SDK Version: 48. Click Finish
Congratulations! You’ve just created your first Android application
We’ll explain each input shortly
![Page 91: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/91.jpg)
Let’s Go Deep…Created Project has the following structure
Project Structure
-Source (src)-Generated Class (gen)-Android 1.6 library-Assets (assets)-Resource(res) -drawable-hdpi -drawable-ldpi -drawable-mdpi -layout -values-AndroidMenifest.xml-default.properties
![Page 92: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/92.jpg)
Let’s Go Deep… (Contd.)To run the app in emulator, we have to do the following steps:
1. Create AVD (Android Virtual Device)2. Create Run Configuration3. Run the Application
To run the app in device, we have to do the following steps:
1. Install device driver2. Connect device through USB3. Create Run Configuration4. Run the Application
We’ll run the app in emulator for now
![Page 93: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/93.jpg)
Let’s Go Deep… (Contd.)1. Create AVD (Android Virtual Device)
Use Android SDK & AVD Manager to create AVD
![Page 94: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/94.jpg)
Let’s Go Deep… (Contd.)2. Create Run Configuration
1. Create a Run Configuration
2. Browse and select the project to run
![Page 95: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/95.jpg)
Let’s Go Deep… (Contd.)3. Select AVD & Run
Click Run to start AVD/emulator
![Page 96: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/96.jpg)
Let’s Go Deep… (Contd.)Result in Emulator
Now its time to analyze how it works
![Page 97: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/97.jpg)
Project Structure…Created Project has the following structure
Project Structure
-Source (src)-Generated Class (gen)-Android 1.6 library-Assets (assets)-Resource(res) -drawable-hdpi -drawable-ldpi -drawable-mdpi -layout -values-AndroidMenifest.xml-default.properties
![Page 98: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/98.jpg)
Project Structure (Contd.)-Source (src)We have used only one class here which is an Activity named HalloActivity. We’ll describe about Activity in detail with lifecycle shortly. For now we can consider Activity as Android analogue for the window or dialog in a desktop application. It can load view from xml layout (here main.xml under res/layout folder)
In the HelloActivity class the view of the Activity is set from main.xml given below
![Page 99: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/99.jpg)
Project Structure (Contd.)-res/layout/main.xml
1. UI Layout can be defined from source code using View or by layout xmls. 2. The layout xml can be generated by visual tool given by ADT
![Page 100: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/100.jpg)
Project Structure (Contd.)-res/drawable1. From Android 1.6 to support different screen sizes and screen densities graphic files
are kept in 3 different folders drawable-hdpi, drawable-ldpi and drawable-mdpi2. In our current project, they contain only default icon file with different dimensions
to support devices with different screen resolution.
-assetsHolds other static files you wish packaged with the application for deployment onto the device. In this project, we have none
-gen/R.java -values/strings.xml
![Page 101: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/101.jpg)
Project Structure (Contd.)-AndroidMenifest.xml
XML file describing the application being built and what components – activities, services, etc. – are being supplied by that application
![Page 102: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/102.jpg)
Cross-platform Development1. RhoMobile http://rhomobile.com/
2. Appcelerator http://www.appcelerator.com/
3. PhoneGap http://www.phonegap.com/
![Page 103: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/103.jpg)
Resources: DVDDVD Content
Tools
Tutorials Day Content1. Video Tutorials2. PPT Slides
Ebooks
![Page 104: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/104.jpg)
Resources: Android Developers’ Sitehttp://developer.android.com
1. Tutorials & Design Guidelines2. SDK References3. Articles on Pragmatic & Good Practices4. & anything you’ll need including Google IO Videos
![Page 105: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/105.jpg)
Resources: Open Source Projects1. http://code.google.com/p/apps-for-android/2. http://en.wikipedia.org/wiki/List_of_open_source_Android_applications
![Page 106: Introduction to Android Development: Before Getting Started](https://reader036.fdocuments.us/reader036/viewer/2022062313/55d4e133bb61eb704e8b45cb/html5/thumbnails/106.jpg)
Questions?