Between love and madness lies obsession<br />
Platform PresentationYour First Android Experience<br />Shrey Malhotra<br />27 / April / 2011<br />
Introduction<br />An droid<br />a robot with a human appearance.<br />What’s an Android?<br />“Android is a software stack...
Introduction<br />What’s an Android?<br />Operating System for Mobile Devices<br />HTC G1, GOOGLE NEXUS S<br />SDK<br />Co...
Introduction<br />Google’s Master Plan <br />• make the cloud more accessible<br />• increase connectivity<br />• make the...
Introduction<br />Google’s Master Plan <br />August 2005<br />
Introduction<br />Google’s Master Plan <br />Open Handset Alliance<br />November 2007<br />
Introduction<br />Google’s Master Plan <br />Open Handset Alliance<br />November 2007<br />
Introduction<br />Google’s Master Plan <br />Android SDK<br />November 2007<br />
Introduction<br />Google’s Master Plan <br />September 2008<br />
Introduction<br />Google’s Master Plan <br />
Why Android?<br />Free of cost <br />Available to all <br />
Why Android?<br />Thousands of useful apps<br />Open Market Place<br />
Why Android?<br />Develop on any platform. <br />Windows,Mac,Linux<br />Not just for mobile<br />
Platform <br />Hardware<br />Android is not a single piece of hardware; it's a complete, end-to-end software<br />platform...
Platform <br />Network Connectivity<br />It supports wireless communications using:<br />GSM mobile-phone technology<br />...
Platform  <br />
Getting Started <br />Android – The Family <br /> <br />Android 3.0 (Honeycomb)        <br />	SDK Ver 11 <br />Android 2.3...
Getting Started - Prerequisites <br />Things Required ?<br />Java Developers Kit(JDK)<br />Android SDK <br />Eclipse or an...
Getting Started - Prerequisites <br />Java Developers Kit (JDK)<br />http://www.oracle.com/technetwork/java/javase/downloa...
Getting Started - Prerequisites <br />Java Developers Kit (JDK)<br />
Getting Started - Prerequisites <br />Java Developers Kit (JDK)<br />
Getting Started - Prerequisites <br />Android SDK<br />http://developer.android.com/sdk/index.html<br />
Getting Started - Prerequisites <br />Eclipse - IDE<br />http://www.eclipse.org/downloads/<br />
Getting Started - Prerequisites <br />Android Developer Tool (ADT)<br />Add https://dl-ssl.google.com/android/eclipse/ to ...
Getting Started - Prerequisites <br />Things Required ?<br />Java Developers Kit(JDK)<br />Android SDK <br />Eclipse or ...
Getting Started - Installing<br />Preparing the Environment<br />Installing <br />JDK<br />Eclipse<br />Android SDK<br />A...
Getting Started - Installing<br />Preparing the Environment<br />After Installing JAVA<br />
Getting Started - Installing<br />Preparing the Environment<br />After Installing Android SDK<br />*skip this step if you ...
Getting Started - Installing<br />Preparing the Environment<br /> Adding Platforms and Other Components<br />*skip this st...
Getting Started - Installing<br />Preparing the Environment<br />*skip this step if you have the folder that we gave you<b...
Getting Started - Installing<br />Preparing the Environment<br />Set Up ADT<br />
Getting Started - Installing<br />Preparing the Environment<br />
Getting Started - Installing<br />Preparing the Environment<br />
Getting Started - Installing<br />Preparing the Environment<br />If this option is available , then the installation was d...
Getting Started - Installing<br />Preparing the Environment<br />Location of the sdk folder<br />
Getting Started – Hello Android !!<br /> Hello Android !!<br />
Getting Started – Hello Android !!<br />Creating a New Android Project<br />From Eclipse, <br />Select File > New > Projec...
Getting Started – Hello Android !!<br />Creating a New Android Project<br />Fill in the project details with the following...
Getting Started – Hello Android !!<br />
Getting Started – Hello Android !!<br />
Getting Started – Hello Android !!<br />
Getting Started – Hello Android !!<br />Project Name<br />This is the Eclipse Project name — the name of the directory tha...
Source directories, where your classes go…<br />SOURCE CODE<br />Getting Started – Hello Android !!<br />
Getting Started – Hello Android !!<br />package com.example.helloandroid;<br />import android.app.Activity;<br />import an...
Getting Started – Hello Android !!<br />Run the Application<br />The Eclipse plug-in makes it easy to run your application...
Getting Started – Hello Android !!<br />Run the Application<br />OOPS!! An Error<br />
Getting Started – Running Your Application<br />Create an Android Virtual Device (Emulator )<br />An Android Virtual Devic...
Getting Started – Running Your Application<br />Create an Android Virtual Device (Emulator )<br />In the Virtual Devices p...
Getting Started – Running Your Application<br />Create an Android Virtual Device (Emulator )<br />Fill in the details for ...
Getting Started – Running Your Application<br />Start an Android Virtual Device (Emulator )<br />
Getting Started – Running Your Application<br />It takes times to start up the emulator...<br />
Getting Started – Running Your Application<br />
Getting Started – Hello Android !!<br />Lets run the App again !!<br />Select Run > Run.<br />Select "Android Application"...
Getting Started – Running Your Application<br />Congratulations your first Android App !!<br />
Getting Started – Running Your Application<br />
Getting Started – Running Your Application<br />
Understanding the Code<br />Activity: A single screen.<br />Your app is made up of<br />one or more Activities<br />Servic...
Understanding the Code<br />Intent: Code to<br />accomplish a verb, like<br />“call number” or “open<br />comic” and to al...
Understanding the Code<br />Content Provider: Data<br />and an API that any app<br />can access.<br />Android provides con...
Understanding the Code<br />Resource: Text, pictures,<br />sound, etc. Everything is<br />broken out of the code<br />into...
Understanding the Code<br />Drawable: A bitmap or xml<br />definition of something<br />that can be drawn.<br />
Understanding the Code<br />The manifest<br />• Declares the permissions the application will need<br /> (uses-permission)...
Understanding the Code<br /><?xml version="1.0" encoding="utf-8"?><br /><manifest xmlns:android="http://schemas.android.co...
Understanding the Code<br />The XML Layout<br />Lets have a look *<br />*Screen-cast<br />
Understanding the Code<br />To be continued…<br /> <br />
Q & A<br />Any questions?<br /> <br />
Thank You !!<br /> <br />
Upcoming SlideShare
Loading in...5
×

Android

4,720

Published on

BVP-Gtug First Meet Up - Getting Started With Android .

Published in: Technology
5 Comments
4 Likes
Statistics
Notes
No Downloads
Views
Total Views
4,720
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
0
Comments
5
Likes
4
Embeds 0
No embeds

No notes for slide

Transcript of "Android"

  1. 1. Between love and madness lies obsession<br />
  2. 2. Platform PresentationYour First Android Experience<br />Shrey Malhotra<br />27 / April / 2011<br />
  3. 3. Introduction<br />An droid<br />a robot with a human appearance.<br />What’s an Android?<br />“Android is a software stack for mobile devices<br />that includes an operating system, middleware<br />and key applications”<br />
  4. 4. Introduction<br />What’s an Android?<br />Operating System for Mobile Devices<br />HTC G1, GOOGLE NEXUS S<br />SDK<br />Compiler, tools and IDE<br />Market<br />Free or paid<br />A Platform for your Applications<br />Based on the Linux kernel, Development on JAVA<br />
  5. 5. Introduction<br />Google’s Master Plan <br />• make the cloud more accessible<br />• increase connectivity<br />• make the client more powerful<br />
  6. 6. Introduction<br />Google’s Master Plan <br />August 2005<br />
  7. 7. Introduction<br />Google’s Master Plan <br />Open Handset Alliance<br />November 2007<br />
  8. 8. Introduction<br />Google’s Master Plan <br />Open Handset Alliance<br />November 2007<br />
  9. 9. Introduction<br />Google’s Master Plan <br />Android SDK<br />November 2007<br />
  10. 10. Introduction<br />Google’s Master Plan <br />September 2008<br />
  11. 11. Introduction<br />Google’s Master Plan <br />
  12. 12. Why Android?<br />Free of cost <br />Available to all <br />
  13. 13. Why Android?<br />Thousands of useful apps<br />Open Market Place<br />
  14. 14. Why Android?<br />Develop on any platform. <br />Windows,Mac,Linux<br />Not just for mobile<br />
  15. 15. Platform <br />Hardware<br />Android is not a single piece of hardware; it's a complete, end-to-end software<br />platform that can be adapted to work on any number of hardware configurations.<br />Everything is there, from the bootloader all the way up to the applications.  <br />Operating System(s)<br />Android uses Linux for its device drivers, memory management, process<br />management, and networking.<br />The next level up contains the Android native libraries. They are all written in<br />C/C++ internally, but you’ll be calling them through Java interfaces. In this layer<br />you can find the Surface Manager, 2D and 3D graphics, Media codecs, the<br />SQL database (SQLite), and a native web browser engine (WebKit).<br />Dalvik Virtual Machine. Dalvik runs dex files, which are converted at compile<br />time from standard class and jar files.<br />
  16. 16. Platform <br />Network Connectivity<br />It supports wireless communications using:<br />GSM mobile-phone technology<br />3G<br />Edge<br />802.11 Wi-Fi networks<br />Security<br />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.<br />
  17. 17. Platform <br />
  18. 18. Getting Started <br />Android – The Family <br /> <br />Android 3.0 (Honeycomb) <br /> SDK Ver 11 <br />Android 2.3.3 (Gingerbread) SDK Ver 10 <br />Android 2.3 (Gingerbread) SDK Ver 9 <br />Android 2.2 (Froyo) <br />SDK Ver 8<br />Android 2.1 (Eclair) <br /> SDK Ver 7<br />Android 1.6 (Donut) <br />SDK Ver 4<br />Android 1.5 (Cupcake)<br /> SDK Ver 3 <br />
  19. 19. Getting Started - Prerequisites <br />Things Required ?<br />Java Developers Kit(JDK)<br />Android SDK <br />Eclipse or any other IDE <br />Android Development Tool ADT<br />Where to find all these ?<br />Lets see !!<br />IDE - Integrated Development Environment<br />
  20. 20. Getting Started - Prerequisites <br />Java Developers Kit (JDK)<br />http://www.oracle.com/technetwork/java/javase/downloads/index.html<br />Or Google – “download jdk” :P<br />
  21. 21. Getting Started - Prerequisites <br />Java Developers Kit (JDK)<br />
  22. 22. Getting Started - Prerequisites <br />Java Developers Kit (JDK)<br />
  23. 23.
  24. 24.
  25. 25. Getting Started - Prerequisites <br />Android SDK<br />http://developer.android.com/sdk/index.html<br />
  26. 26.
  27. 27. Getting Started - Prerequisites <br />Eclipse - IDE<br />http://www.eclipse.org/downloads/<br />
  28. 28.
  29. 29. Getting Started - Prerequisites <br />Android Developer Tool (ADT)<br />Add https://dl-ssl.google.com/android/eclipse/ to Eclipse Update Manager<br />
  30. 30. Getting Started - Prerequisites <br />Things Required ?<br />Java Developers Kit(JDK)<br />Android SDK <br />Eclipse or any other IDE  <br />Android Development Tool ADT<br />IDE - Integrated Development Environment<br />
  31. 31. Getting Started - Installing<br />Preparing the Environment<br />Installing <br />JDK<br />Eclipse<br />Android SDK<br />ADT <br />Lets see how it is done <br />
  32. 32. Getting Started - Installing<br />Preparing the Environment<br />After Installing JAVA<br />
  33. 33. Getting Started - Installing<br />Preparing the Environment<br />After Installing Android SDK<br />*skip this step if you have the folder that we gave you<br />
  34. 34. Getting Started - Installing<br />Preparing the Environment<br /> Adding Platforms and Other Components<br />*skip this step if you have the folder that we gave you<br />
  35. 35. Getting Started - Installing<br />Preparing the Environment<br />*skip this step if you have the folder that we gave you<br />
  36. 36. Getting Started - Installing<br />Preparing the Environment<br />Set Up ADT<br />
  37. 37. Getting Started - Installing<br />Preparing the Environment<br />
  38. 38. Getting Started - Installing<br />Preparing the Environment<br />
  39. 39. Getting Started - Installing<br />Preparing the Environment<br />If this option is available , then the installation was done correctly<br />
  40. 40. Getting Started - Installing<br />Preparing the Environment<br />Location of the sdk folder<br />
  41. 41. Getting Started – Hello Android !!<br /> Hello Android !!<br />
  42. 42. Getting Started – Hello Android !!<br />Creating a New Android Project<br />From Eclipse, <br />Select File > New > Project > Android Project (only after everything was set up properly)<br />
  43. 43. Getting Started – Hello Android !!<br />Creating a New Android Project<br />Fill in the project details with the following values:<br />Project name: HelloAndroid<br />Application name: HelloAndroid<br />Package name: com.example.helloandroid<br />Create Activity: HelloAndroid<br />
  44. 44. Getting Started – Hello Android !!<br />
  45. 45. Getting Started – Hello Android !!<br />
  46. 46. Getting Started – Hello Android !!<br />
  47. 47. Getting Started – Hello Android !!<br />Project Name<br />This is the Eclipse Project name — the name of the directory that will contain the project files.<br />Application Name<br />This is the human-readable title for your application — the name that will appear on the Android device.<br />Package Name<br />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<br />Create Activity<br />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.<br />
  48. 48. Source directories, where your classes go…<br />SOURCE CODE<br />Getting Started – Hello Android !!<br />
  49. 49. Getting Started – Hello Android !!<br />package com.example.helloandroid;<br />import android.app.Activity;<br />import android.os.Bundle;<br />public class HelloAndroid extends Activity {<br /> /** Called when the activity is first created. */<br /> @Override<br /> public void onCreate(Bundle savedInstanceState) {<br /> super.onCreate(savedInstanceState);<br /> setContentView(R.layout.main);<br /> }<br />}<br />
  50. 50. Getting Started – Hello Android !!<br />Run the Application<br />The Eclipse plug-in makes it easy to run your applications:<br />Select Run > Run.<br />Select "Android Application".<br />`<br />
  51. 51. Getting Started – Hello Android !!<br />Run the Application<br />OOPS!! An Error<br />
  52. 52. Getting Started – Running Your Application<br />Create an Android Virtual Device (Emulator )<br />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.<br />Start the AVD Manager: <br />In Eclipse: select Window > Android SDK and AVD Manager, or click the Android SDK and AVD Manager icon in the Eclipse toolbar.<br />*only one time process<br />
  53. 53. Getting Started – Running Your Application<br />Create an Android Virtual Device (Emulator )<br />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.<br />*only one time process<br />
  54. 54. Getting Started – Running Your Application<br />Create an Android Virtual Device (Emulator )<br />Fill in the details for the AVD. <br />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. <br />*only one time process<br />
  55. 55. Getting Started – Running Your Application<br />Start an Android Virtual Device (Emulator )<br />
  56. 56. Getting Started – Running Your Application<br />It takes times to start up the emulator...<br />
  57. 57. Getting Started – Running Your Application<br />
  58. 58. Getting Started – Hello Android !!<br />Lets run the App again !!<br />Select Run > Run.<br />Select "Android Application".<br />or<br />Press Ctrl + F11<br />`<br />
  59. 59. Getting Started – Running Your Application<br />Congratulations your first Android App !!<br />
  60. 60. Getting Started – Running Your Application<br />
  61. 61. Getting Started – Running Your Application<br />
  62. 62. Understanding the Code<br />Activity: A single screen.<br />Your app is made up of<br />one or more Activities<br />Service: A task that can<br />be running while not<br />visible.<br />
  63. 63. Understanding the Code<br />Intent: Code to<br />accomplish a verb, like<br />“call number” or “open<br />comic” and to allow app to<br />app communication.<br />
  64. 64. Understanding the Code<br />Content Provider: Data<br />and an API that any app<br />can access.<br />Android provides contact information<br />through a Content Provider.<br />
  65. 65. Understanding the Code<br />Resource: Text, pictures,<br />sound, etc. Everything is<br />broken out of the code<br />into a resource, which is<br />compiled into a class<br />called R<br />
  66. 66. Understanding the Code<br />Drawable: A bitmap or xml<br />definition of something<br />that can be drawn.<br />
  67. 67. Understanding the Code<br />The manifest<br />• Declares the permissions the application will need<br /> (uses-permission)<br />• Declare permissions that activities or services might require to use your app (permission)<br /><ul><li> Defines the activities, services, broadcast receivers etc</li></ul>• Provide hardware access <br />And much more.. <br />
  68. 68. Understanding the Code<br /><?xml version="1.0" encoding="utf-8"?><br /><manifest xmlns:android="http://schemas.android.com/apk/res/android"<br />package="com.bikerolas"<br />android:versionCode="30"<br />android:versionName="1.2"><br /><uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /><br /><uses-permission android:name="android.permission.ACCESS_LOCATION /><br /><uses-permission android:name="android.permission.ACCESS_GPS" /><br /><uses-permission android:name="android.permission. ACCESS_CELL_ID /><br /><application android:icon="@drawable/flingicn1" android:label="@string/app_name" android:debuggable="false"><br /><activity android:name=".Fling"<br />android:label="@string/app_name"><br /><intent-filter><br /><action android:name="android.intent.action.MAIN" /><br /><category android:name="android.intent.category.LAUNCHER" /><br /></intent-filter><br /></activity><br /><service android:name=".FlingService" /><br /><receiver android:name=".FlingServiceManager"<br />android:permission="android.permission.RECEIVE_BOOT_COMPLETED"><br /><intent-filter><br /><action android:name="android.intent.action.BOOT_COMPLETED" /><br /></intent-filter><br /></receiver><br /></application><br /><uses-sdkandroid:minSdkVersion="2"></uses-sdk><br /></manifest><br />
  69. 69. Understanding the Code<br />The XML Layout<br />Lets have a look *<br />*Screen-cast<br />
  70. 70. Understanding the Code<br />To be continued…<br /> <br />
  71. 71. Q & A<br />Any questions?<br /> <br />
  72. 72. Thank You !!<br /> <br />

×