3. Introduction An droid a robot with a human appearance. What’s an Android? “Android is a software stack for mobile devices that includes an operating system, middleware and key applications”
4. Introduction What’s an Android? Operating System for Mobile Devices HTC G1, GOOGLE NEXUS S SDK Compiler, tools and IDE Market Free or paid A Platform for your Applications Based on the Linux kernel, Development on JAVA
5. Introduction Google’s Master Plan • make the cloud more accessible • increase connectivity • make the client more powerful
15. Platform Hardware Android is not a single piece of hardware; it's a complete, end-to-end software platform that can be adapted to work on any number of hardware configurations. Everything is there, from the bootloader all the way up to the applications. Operating System(s) Android uses Linux for its device drivers, memory management, process management, and networking. The next level up contains the Android native libraries. They are all written in C/C++ internally, but you’ll be calling them through Java interfaces. In this layer you can find the Surface Manager, 2D and 3D graphics, Media codecs, the SQL database (SQLite), and a native web browser engine (WebKit). Dalvik Virtual Machine. Dalvik runs dex files, which are converted at compile time from standard class and jar files.
16. Platform Network Connectivity It supports wireless communications using: GSM mobile-phone technology 3G Edge 802.11 Wi-Fi networks Security Android is a multi-process system, in which each application (and parts of the system) runs in its own process. Most security between applications and the system is enforced at the process level through standard Linux facilities, such as user and group IDs that are assigned to applications.
18. Getting Started Android – The Family Android 3.0 (Honeycomb) SDK Ver 11 Android 2.3.3 (Gingerbread) SDK Ver 10 Android 2.3 (Gingerbread) SDK Ver 9 Android 2.2 (Froyo) SDK Ver 8 Android 2.1 (Eclair) SDK Ver 7 Android 1.6 (Donut) SDK Ver 4 Android 1.5 (Cupcake) SDK Ver 3
19. Getting Started - Prerequisites Things Required ? Java Developers Kit(JDK) Android SDK Eclipse or any other IDE Android Development Tool ADT Where to find all these ? Lets see !! IDE - Integrated Development Environment
20. Getting Started - Prerequisites Java Developers Kit (JDK) http://www.oracle.com/technetwork/java/javase/downloads/index.html Or Google – “download jdk” :P
25. Getting Started - Prerequisites Android SDK http://developer.android.com/sdk/index.html
26.
27. Getting Started - Prerequisites Eclipse - IDE http://www.eclipse.org/downloads/
28.
29. Getting Started - Prerequisites Android Developer Tool (ADT) Add https://dl-ssl.google.com/android/eclipse/ to Eclipse Update Manager
30. Getting Started - Prerequisites Things Required ? Java Developers Kit(JDK) Android SDK Eclipse or any other IDE Android Development Tool ADT IDE - Integrated Development Environment
31. Getting Started - Installing Preparing the Environment Installing JDK Eclipse Android SDK ADT Lets see how it is done
32. Getting Started - Installing Preparing the Environment After Installing JAVA
33. Getting Started - Installing Preparing the Environment After Installing Android SDK *skip this step if you have the folder that we gave you
34. Getting Started - Installing Preparing the Environment Adding Platforms and Other Components *skip this step if you have the folder that we gave you
35. Getting Started - Installing Preparing the Environment *skip this step if you have the folder that we gave you
42. Getting Started – Hello Android !! Creating a New Android Project From Eclipse, Select File > New > Project > Android Project (only after everything was set up properly)
43. Getting Started – Hello Android !! Creating a New Android Project Fill in the project details with the following values: Project name: HelloAndroid Application name: HelloAndroid Package name: com.example.helloandroid Create Activity: HelloAndroid
47. Getting Started – Hello Android !! Project Name This is the Eclipse Project name — the name of the directory that will contain the project files. Application Name This is the human-readable title for your application — the name that will appear on the Android device. Package Name This is the package namespace (following the same rules as for packages in the Java programming language) that you want all your source code to reside under. The example above uses the "com.example" namespace Create Activity An Activity is simply a class that can run and do work. It can create a User Interface if it chooses, but it doesn't need to. As the checkbox suggests, this is optional, but an Activity is almost always used as the basis for an application.
49. Getting Started – Hello Android !! package com.example.helloandroid; import android.app.Activity; import android.os.Bundle; public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } }
50. Getting Started – Hello Android !! Run the Application The Eclipse plug-in makes it easy to run your applications: Select Run > Run. Select "Android Application". `
51. Getting Started – Hello Android !! Run the Application OOPS!! An Error
52. Getting Started – Running Your Application Create an Android Virtual Device (Emulator ) An Android Virtual Device (AVD) is an emulator that simulates a real-world Android device, such as a mobile phone or Tablet PC. You can use AVDs to test how your application performs on a wide variety of Android devices, without having to buy every gadget on the market. Start the AVD Manager: In Eclipse: select Window > Android SDK and AVD Manager, or click the Android SDK and AVD Manager icon in the Eclipse toolbar. *only one time process
53. Getting Started – Running Your Application Create an Android Virtual Device (Emulator ) In the Virtual Devices panel, you'll see a list of existing AVDs. Click New to create a new AVD. The Create New AVD dialog appears. *only one time process
54. Getting Started – Running Your Application Create an Android Virtual Device (Emulator ) Fill in the details for the AVD. Give it a name, a platform target, an SD card size, and a skin (HVGA is default). You can also add specific hardware features of the emulated device by clicking the New... button and selecting the feature. *only one time process
55. Getting Started – Running Your Application Start an Android Virtual Device (Emulator )
56. Getting Started – Running Your Application It takes times to start up the emulator...
62. Understanding the Code Activity: A single screen. Your app is made up of one or more Activities Service: A task that can be running while not visible.
63. Understanding the Code Intent: Code to accomplish a verb, like “call number” or “open comic” and to allow app to app communication.
64. Understanding the Code Content Provider: Data and an API that any app can access. Android provides contact information through a Content Provider.
65. Understanding the Code Resource: Text, pictures, sound, etc. Everything is broken out of the code into a resource, which is compiled into a class called R
66. Understanding the Code Drawable: A bitmap or xml definition of something that can be drawn.