• Save
Android
Upcoming SlideShare
Loading in...5
×
 

Android

on

  • 4,835 views

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

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

Statistics

Views

Total Views
4,835
Views on SlideShare
4,591
Embed Views
244

Actions

Likes
4
Downloads
0
Comments
5

6 Embeds 244

http://bvpgtug.org 211
http://www.slideshare.net 24
http://fp1pmjh2ucfonfpqc5g38e6k1n1ap94k-a-sites-opensocial.googleusercontent.com 3
https://www.linkedin.com 3
http://pracdiplomado.blogspot.com 2
http://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Android Android Presentation Transcript

  • Between love and madness lies obsession
  • Platform PresentationYour First Android Experience
    Shrey Malhotra
    27 / April / 2011
  • 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”
  • 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
  • Introduction
    Google’s Master Plan
    • make the cloud more accessible
    • increase connectivity
    • make the client more powerful
  • Introduction
    Google’s Master Plan
    August 2005
  • Introduction
    Google’s Master Plan
    Open Handset Alliance
    November 2007
  • Introduction
    Google’s Master Plan
    Open Handset Alliance
    November 2007
  • Introduction
    Google’s Master Plan
    Android SDK
    November 2007
  • Introduction
    Google’s Master Plan
    September 2008
  • Introduction
    Google’s Master Plan
  • Why Android?
    Free of cost
    Available to all
  • Why Android?
    Thousands of useful apps
    Open Market Place
  • Why Android?
    Develop on any platform.
    Windows,Mac,Linux
    Not just for mobile
  • 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.
  • 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.
  • Platform
  • 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
  • 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
  • Getting Started - Prerequisites
    Java Developers Kit (JDK)
    http://www.oracle.com/technetwork/java/javase/downloads/index.html
    Or Google – “download jdk” :P
  • Getting Started - Prerequisites
    Java Developers Kit (JDK)
  • Getting Started - Prerequisites
    Java Developers Kit (JDK)
  • Getting Started - Prerequisites
    Android SDK
    http://developer.android.com/sdk/index.html
  • Getting Started - Prerequisites
    Eclipse - IDE
    http://www.eclipse.org/downloads/
  • Getting Started - Prerequisites
    Android Developer Tool (ADT)
    Add https://dl-ssl.google.com/android/eclipse/ to Eclipse Update Manager
  • Getting Started - Prerequisites
    Things Required ?
    Java Developers Kit(JDK)
    Android SDK 
    Eclipse or any other IDE 
    Android Development Tool ADT
    IDE - Integrated Development Environment
  • Getting Started - Installing
    Preparing the Environment
    Installing
    JDK
    Eclipse
    Android SDK
    ADT
    Lets see how it is done
  • Getting Started - Installing
    Preparing the Environment
    After Installing JAVA
  • Getting Started - Installing
    Preparing the Environment
    After Installing Android SDK
    *skip this step if you have the folder that we gave you
  • Getting Started - Installing
    Preparing the Environment
    Adding Platforms and Other Components
    *skip this step if you have the folder that we gave you
  • Getting Started - Installing
    Preparing the Environment
    *skip this step if you have the folder that we gave you
  • Getting Started - Installing
    Preparing the Environment
    Set Up ADT
  • Getting Started - Installing
    Preparing the Environment
  • Getting Started - Installing
    Preparing the Environment
  • Getting Started - Installing
    Preparing the Environment
    If this option is available , then the installation was done correctly
  • Getting Started - Installing
    Preparing the Environment
    Location of the sdk folder
  • Getting Started – Hello Android !!
    Hello Android !!
  • Getting Started – Hello Android !!
    Creating a New Android Project
    From Eclipse,
    Select File > New > Project > Android Project (only after everything was set up properly)
  • 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
  • Getting Started – Hello Android !!
  • Getting Started – Hello Android !!
  • Getting Started – Hello Android !!
  • 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.
  • Source directories, where your classes go…
    SOURCE CODE
    Getting Started – Hello Android !!
  • 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);
    }
    }
  • Getting Started – Hello Android !!
    Run the Application
    The Eclipse plug-in makes it easy to run your applications:
    Select Run > Run.
    Select "Android Application".
    `
  • Getting Started – Hello Android !!
    Run the Application
    OOPS!! An Error
  • 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
  • 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
  • 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
  • Getting Started – Running Your Application
    Start an Android Virtual Device (Emulator )
  • Getting Started – Running Your Application
    It takes times to start up the emulator...
  • Getting Started – Running Your Application
  • Getting Started – Hello Android !!
    Lets run the App again !!
    Select Run > Run.
    Select "Android Application".
    or
    Press Ctrl + F11
    `
  • Getting Started – Running Your Application
    Congratulations your first Android App !!
  • Getting Started – Running Your Application
  • Getting Started – Running Your Application
  • 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.
  • Understanding the Code
    Intent: Code to
    accomplish a verb, like
    “call number” or “open
    comic” and to allow app to
    app communication.
  • Understanding the Code
    Content Provider: Data
    and an API that any app
    can access.
    Android provides contact information
    through a Content Provider.
  • 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
  • Understanding the Code
    Drawable: A bitmap or xml
    definition of something
    that can be drawn.
  • Understanding the Code
    The manifest
    • Declares the permissions the application will need
    (uses-permission)
    • Declare permissions that activities or services might require to use your app (permission)
    • Defines the activities, services, broadcast receivers etc
    • Provide hardware access
    And much more..
  • Understanding the Code
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.bikerolas"
    android:versionCode="30"
    android:versionName="1.2">
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.ACCESS_LOCATION />
    <uses-permission android:name="android.permission.ACCESS_GPS" />
    <uses-permission android:name="android.permission. ACCESS_CELL_ID />
    <application android:icon="@drawable/flingicn1" android:label="@string/app_name" android:debuggable="false">
    <activity android:name=".Fling"
    android:label="@string/app_name">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>
    <service android:name=".FlingService" />
    <receiver android:name=".FlingServiceManager"
    android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
    <intent-filter>
    <action android:name="android.intent.action.BOOT_COMPLETED" />
    </intent-filter>
    </receiver>
    </application>
    <uses-sdkandroid:minSdkVersion="2"></uses-sdk>
    </manifest>
  • Understanding the Code
    The XML Layout
    Lets have a look *
    *Screen-cast
  • Understanding the Code
    To be continued…
     
  • Q & A
    Any questions?
     
  • Thank You !!