Android Introduction - Atomic Rhubarb Android1... · Android applications, install it now. ... •...

68
Android Introduction

Transcript of Android Introduction - Atomic Rhubarb Android1... · Android applications, install it now. ... •...

Android Introduction

CSCI 4237 - Software Design For Handheld Devices

http://www.atomicrhubarb.com/handheld Lecture 6 – Beginning Android Development

Android •  Uses Eclipse + a bunch of plug-ins. •  Probably doesn't cohabitate in Eclipse

with other Java development plug-ins (few do), so we need a new install of Eclipse.

•  Start here http://developer.android.com/sdk/index.html

Android SDK •  Here's an overview of the steps you

must follow to set up the Android SDK: 1. Prepare your development computer and ensure it meets

the system requirements. 2.  Install the SDK starter package from the table above. (If

you're on Windows, download the installer for help with the initial setup.)

3.  Install the ADT Plugin for Eclipse (if you'll be developing in Eclipse).

4. Add Android platforms and other components to your SDK.

5.  Explore the contents of the Android SDK (optional).

Android SDK •  Install the SDK starter package from the table above. (If

you're on Windows, download the installer for help with the initial setup.)

Android SDK •  If you need to install Eclipse, you can

download it from this location: •  http://www.eclipse.org/downloads/ •  The "Eclipse Classic" version is

recommended.

Install Eclipse

Android Development Tools •  Android offers a custom plugin for the

Eclipse IDE, called Android Development Tools (ADT), that is designed to give you a powerful, integrated environment in which to build Android applications.

•  If you'd like to use ADT for developing Android applications, install it now. Read Installing the ADT Plugin for step-by-step installation instructions, then return here to continue the last step in setting up your Android SDK.

Install ADT •  Start Eclipse, then select Help > Install New

Software.... •  Click Add, in the top-right corner. •  In the Add Repository dialog that appears, enter

"ADT Plugin" for the Name and the following URL for the Location:

•  https://dl-ssl.google.com/android/eclipse/

•  Click OK •  Note: If you have trouble acquiring the plugin, try

using "http" in the Location URL, instead of "https" (https is preferred for security reasons).

Install ADT

•  In the Available Software dialog, select the checkbox next to Developer Tools and click Next.

•  In the next window, you'll see a list of the tools to be downloaded. Click Next.

•  Read and accept the license agreements, then click Finish.

•  Note: If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.

•  When the installation completes, restart Eclipse.

Find the SDK download

Run it, put it in c:\tools\

Start Eclipse

•  Make sure it’s the right one

SDK components •  The last step in setting up your SDK is using the

Android SDK and AVD Manager (a tool included in the SDK starter package) to download essential SDK components into your development environment.

•  You can launch the Android SDK and AVD Manager in one of the following ways:

•  From within Eclipse, select Window > Android SDK and AVD Manager.

•  On Windows, double-click the SDK Manager.exe file at the root of the Android SDK directory.

C:\tools\android-sdk-windows

This takes some time

A long time …

Or … run it from inside Eclipse

Verify that its working

Building Your First App (Hello World) http://developer.android.com/training/basics/firstapp/index.html

Android •  Following the Hello World tutorial is an

essential first step in getting started with Android development !

Android Hello World •  Start Eclipse •  Install a platform •  Create an Android Virtual Device

HelloWorld v1

•  Back in Eclipse •  File -> New -> Project •  Pick Android Project

New Android Project

Again

•  Now make another HelloAndroid but •  Use the XML based UI layout rather than the

programmatic UI •  Edit /res/layout/main.xml •  Edit /res/values/strings.xml •  Edit HelloAndroid are put it back the way the IDE

created it (XML based) •  Examine R.java

•  Run it to prove to yourself that it works just fine.

Problems On A Mac with Retina Display

One Solution

•  http://www.kotancode.com/2012/08/06/getting-the-android-emulator-to-work-on-the-macbook-pro-retina-display

•  Follow the link •  Install RDM

Who Makes Android devices?

•  Acer •  Asus •  HTC •  Huawei •  LG •  Motorola •  Panasonic •  Samsung •  Sony •  Sony Ericsson •  ZTE

•  Asus •  Alcatel •  Amazon •  Archos •  Barnes & Noble •  Bluelans •  Cherry Mobile •  Creative •  Dell •  Garmin •  General Mobile •  Lenovo •  Kyocera •  Nexian •  Ouku •  Pantech •  Toshiba •  Videocon •  Viewsonic

Types of Android devices?

•  SMartPhone •  Tablets •  eReaders •  Netbooks •  SmartWatches •  Car Computers •  Portable media player •  Set Top Box •  Game Console •  Head Mounted Display •  Television

How  Many  Models  Of  Android  Phones  do  you  think  are  ac8ve  on  networks  now?  

3,997 Models: Android Fragmentation As Seen By The

Developers Of OpenSignalMaps

References 1.  developer.android.com/resources 2. http://techcrunch.com/2012/05/15/3997-

models-android-fragmentation-as-seen-by-the-developers-of-opensignalmaps/

For This Week

•  More in the following weeks.