• No results found

Introduction to Android Development

N/A
N/A
Protected

Academic year: 2021

Share "Introduction to Android Development"

Copied!
17
0
0

Full text

(1)

Introduction to

Android Development

Keshav Bahadoor

An basic guide to setting up and building native Android applications

(2)

Table of Contents

1. Terms and Definitions...3

2. Overview ...3

3. Setting up...3

3.1 Installing the Java JDK ...3

3.2 Installing the Android ADT Bundle...4

3.3 Setting up the Android Development Environment ...4

3.3.1 Select the Workspace ...5

3.3.2 Welcome Screen ...5

3.3.3 Eclipse overview...6

4. Running Example Android Applications...8

4.1 Importing existing Android projects into Eclipse...8

4.2 Setting up the Android Emulator...12

4.3 Running a Project...16

(3)

1. Terms and Definitions

This section presents some common technological jargon and their explanations.

Term Definition

Native Application An application that is made to run on solely on a particular operating system, such as Android or iOS.

Application The software or product that is created to run on mobile devices or computers.

Operating System

Cross platform The idea of writing code once and having it work across all platforms or operating systems / devices.

IDE Integrated Development Environment

SDK Software Development Kit

2. Overview

Android applications can be created in the following ways:

1. Programming the application specifically for Android devices using the Android SDK (Software Development Kit) and a development environment such as Eclipse.

2. Using an app building tool such as App Inventor (insert link).

3. Programming a solution that works across all platforms or devices, using a cross platform tools (PhoneGap, LibGDX, etc).

This document will focus on the first way of creating Android applications.

3. Setting up

This section provides a guide to install and setup the software required for building Android applications.

(4)

To find out if your Windows computer is 32bit or 64bit:

Right click on My Computer then select Properties. The version should be displayed here.

3.2 Installing the Android ADT Bundle

The android ADT or Android Development Tools bundle is an integrated development environment for the use creation of Android applications. It is a customized version of the Eclipse Integrated

Development Environment (IDE). Note on Eclipse

Eclipse IDE is a tool that allows you to create various types of Java based applications, including Android applications. It facilitates the creation of projects, adding and deleting of files to the projects, and the editing of code.

The ADT Bundle can be downloaded at: http://developer.android.com/sdk/index.html

Ensure that you download the correct version of the ADT Bundle (32 bit or 64 bit).

After downloading the ADT bundle, it will need to be extracted. This can be done by using winzip, winrar, or 7-zip.

You can download 7-zip from here: http://www.7-zip.org/download.html

3.3 Setting up the Android Development Environment

(5)

3.3.1 Select the Workspace

When launched, Eclipse will then ask you to select a workspace. The workspace is a location on your computer that Eclipse will use to store all your projects and applications.

You can leave the default workspace that Eclipse suggests.

You may also select the option “Use this as the default and do not ask again”. This option tells Eclipse that you will be working with that location always.

Note that you can change the workspace at anytime if you wish. Click the OK button to start Eclipse.

3.3.2 Welcome Screen

(6)

You may read the welcome note, and then click the close button to proceed.

3.3.3 Eclipse overview

The following is an overview of the main windows of the Eclipse environment. Click close button to

(7)

 Package Explorer

Shows your current packages, projects or applications that you are working on.  Code Area

Area to edit code files.  Console

This area displays to the user output, warnings and other messages.  Memory Usage

Displays the amount of memory Eclipse is currently using. Package

Explorer

Code Area

Console

(8)

4. Running Example Android Applications

You can visit the following website to download the android application examples that were covered during the workshop.

http://keshav.ocsdev.org/mlearning/

4.1 Importing existing Android projects into Eclipse

Download the Anroid Application Examples zip file, and extract the contents to your computer. You may use winzip, winrar or 7-zip to extract the files.

Now, open Eclipse if not already opened.

Click File from the top menu bar, and then select the Import menu option.

(9)

Click on the Next button to proceed.

In the resulting dialog window, click the Browse button next to “Select root directory”.

(10)

Click on the OK button.

(11)

Ensure that both projects are checked. If they are not checked, click the checkbox next to the projects. Next, ensure that the “Copy projects into workspace” option is checked. This option instructs Eclipse to copy the projects into the workspace. If this is not selected, Eclipse will use the projects from the location specified earlier.

(12)

4.2 Setting up the Android Emulator

The Android emulator allows you to emulate an Android device on the computer. This enables you to test or debug Android applications without using a physical Android mobile handset.

The main disadvantage of the Android emulator is that it performs much slower than a physical Android device.

The Android emulator can be setup as follows.

Click Window from the top menu options then select Android Virtual Device Manager (also referred to as the AVD Manager).

(13)
(14)
(15)

In this dialog box, you must give the Android virtual device a name. Type the name you want in the AVD

Name field. In this example the name “AndroidEMU” was used.

Next, a Device should be specified. This is the virtual android mobile device that the AVD manager will create for you. It is based on some common screen sizes available to consumers.

Target sets the version of the Android Operating system you wish you emulate. For now you will leave

(16)

To run the Android virtual device, select it from the AVD list, then click the “Start..” button. A window that resembles an android mobile smart phone will appear.

It is common for the Android virtual device to take a couple minutes to start.

4.3 Running a Project

A project present in the Package Explorer of Eclipse.

You can run projects by right clicking on the required project from the Package Explorer, then selecting

(17)

5. Further Reading

 The following is a great video resource on building Android applications using the Java programming language. It is aimed at beginners. Although some things may be outdated, I highly recommend using these videos.

http://thenewboston.org/list.php?cat=6

References

Related documents

As a consequence, with their teachers’ assistance, pre-service teachers are called upon to become more aware of ICC and consider more mindful reasons to see the study of culture

The GCC employment policy dilemmas ● Beyond the saga of the ‘Trojan horse’ ● Salafism and young women in London ● Bombed into (temporary) silence ● Singing playgrounds of

Applicants must have documentation of a minimum of 1,600 clock hours prior to the date of application to the Department for approval, delivering such service to children under

The another new drug delivery concept is the control release of drug form the dosage form where the drug is released from the dosage form in a constant manner in respect

The study population was constituted by 100 consecutive euthyroid obese patients (BMI >30 kg/m 2 ), classified as severely obese (50 females/50 males; mean age, 40.4±12.7 yr;

Smith concludes that twenty-first century American globalism, whether by neoliberal or neoconservative means, is the most ambitious fruit of the central antagonism in

Table 8 – Number Ni of allowed axle group passages and aggressiveness Ai = Nref/Ni (Nref for standard single axle) for each axle group (A to E) of the vehicles on the pavements (tb:

tangent of this transformation, shown in Figure 3a, are the actual and perceived angular velocities,

The principle of lex posterior derogat legi priori (in the case of a conflict, the applied legal provision later won over previous legal provision) also cannot be used in this

Jill has been providing design services for Torrco since December 2010 and worked briefly as a direct employee (2-10/2013) when we were unveiling our new name, logo, and branding,

To develop an application using the FTDI Java D2XX for Android driver, the development machine needs the Eclipse IDE and an up-to-date Android SDK, including the ADB

Develop using the Android Software Development Kit (SDK), a powerful development framework that can deploy to hundreds of compatible mobile devices.. The framework

Subsequently, in the implementation of wikis in the replacement course, tutors (who were all obliged to work with the wiki) were rather negative about using the wiki for their

Analysis of 37 patents developed by Renorbio and considered for this study aimed at investigating a biotechnology sector network’s properties and types with regard

You can retouch KODAK PROFESSIONAL TRI-X 320 Film (120, 220 and sheet sizes) by applying liquid dyes to the base or emulsion side..

Developers Kit), the Eclipse Platform, the Android SDK, and the Android Developer Tools (ADT) Plug-in that is configured within

There are four pieces of software you need before you can run your code on the Android phones: the Java Development Toolkit, the Android SDK, the Eclipse IDE, and the Android

Android development environment to build ▶ Eclipse installation and setup.. Android development environment to build ▶ Eclipse installation

make java documentation android app building game android development nexus 7 2013 android sdk ndk ubuntu android apps development tools how to make calculator app in android

development pdf best android development company in bangalore android development tools (adt) how to create your own app wikihow game development ai free download android sdk

We need to install eclipse extension ADT (Android Development Toolkit) for development of the Android Application:.. ADT on Eclipse

Go to http://developer.android.com/sdk and download the Android ADT Bundle, it includes Eclipse with built-in Android development tools and Android SDK components.. Accept

As suitable mathematical models for large insurance claims are used heavy-tailed distributions (subexponential, stable and max-stable distributions).The main reason why we