ANDROID PROGRAMMING MODULE 1 – GETTING STARTED

Slides:



Advertisements
Similar presentations
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Scienze dellInformazione Università di Bologna.
Advertisements

Chapter 1: Voilà! Meet the Android
Programming Mobile Applications with Android
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna.
The Android Development Environment.  Getting started on the Android Platform  Installing required libraries  Programming Android using the Eclipse.
Filip Debelić What is it? Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google Android,
1 Mobile Computing Mobile First (formerly Worklight) Copyright 2015 by Janson Industries.
Android: Hello World Frank Xu Gannon University. Steps Configuration ▫Android SDK ▫Android Development Tools (ADT)  Eclipse plug-in ▫Android SDK and.
Google Android as a mobile development platform T Internet Technologies for Mobile Computing Olli Mäkinen.
Android Programming Beomjoo Seo Sep., 12 CS5248 Fall 2012.
2. Setting Up Your Android Development Environment.
Setting up the Development Environment Copyright © SUPINFO. All rights reserved Preparation.
How to make it work? Doncho Minkov Telerik Academy academy.telerik.com Technical Trainer
SET UP COMPUTER ** PLEASE BE AWARE SCREENSHOTS MAY NOT MATCH **
Android Tutorial Larry Walters OOSE Fall References This tutorial is a brief overview of some major concepts…Android is much richer and more complex.
INTERNATIONAL SUMMER ACADEMIC COURSE UNIVESITY OF NIS ISAC – Android programming.
Android Application Development CSE 5520/4520 Wireless Networks.
SEEM4570: XAMPP, Eclipse, Summary of Html Kangfei Zhao Room 711,ERB
Android Programming. Outline Preparation Create new project Build and Run a project Debug a project Deploy on devices.
Android Application Development 2013 PClassic Chris Murphy 1.
Chapter 1: Voilà! Meet the Android. Smartphones –Can browse the Web –Allow you to play games –Use business applications –Check –Play music –Record.
Android Introduction Platform Overview.
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
Chapter 3 Navigating a Project Goals & Objectives 1.Get familiar with the navigation of the project. How is everything structured? What settings can you.
Google Maps Android API v2 吳俊興 國立高雄大學 資訊工程學系 CSF645 – Mobile Computing 行動計算
CS5103 Software Engineering Lecture 08 Android Development II.
Wireless Mobility with Android 1 Presented by: Ung Yean MS. Computer Science American University, Washington DC, USA.
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Android Programming By Mohsen Biglari Android Programming, Part1: Introduction 1 Part1: Introduction By Mohsen Biglari.
Chapter 1: Voilà! Meet the Android
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
Android. The Eclipse IDE Installation Requirements: Eclipse Java Windows All must match (32-bit OR 64-bit) If you have a 64-bit OS & 32-bit browser,
Introduction to Android. Android as a system, is a java based operating system that runs on the Linux kernel. The system is very lightweight and full.
Ali Shahrokni Application Components Activities Services Content providers Broadcast receivers.
Presentation Seminar on “IMAGE SLIDER –AN ANDROID APPLICATION”
Basic Android Tutorial USF’s Association for Computing Machinery.
Android for Java Developers Denver Java Users Group Jan 11, Mike
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Presented By: Muhammad Tariq Software Engineer Android Training course.
Android architecture & setting up. Android operating system comprises of different software components arranges in stack. Different components of android.
Configuring Android Development Environment Nilesh Singh.
Android Development Environment Environment/tools Windows Eclipse IDE for Java Developers (v3.5 Galileo) Java Platform (JDK 6 Update 18) Android.
Creating an Example Android App in Android Studio Activity lifecycle & UI Resources.
Liferay Installation Prepared by: Do Xuan Hai 8 August 2011.
First Venture into the Android World Chapter 1 Part 2.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
ANDROID APPLICATION DEVELOPMENT. ANDROID DEVELOPMENT DEVELOPER.ANDROID.COM/INDEX.HTML THE OFFICIAL SITE FOR ANDROID DEVELOPERS. PROVIDES THE ANDROID SDK.
INTRODUCTION TO JAVA AND ANDROID. Slide 2 Our Ecosystem Java Eclipse Android SDK.
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
Installation of Visual Studio Android emulator and Android Studio
Master Software Solutions Pvt.Ltd.. These days the demand of smart phone is being increased and we have different types of client e.g. Touch Phone, tables,
Android apps development - Eclipse, Android SDK, and ADT plugin Introduction of.
IBM Worklight environment setup 1. Eclipse IDE Multi-purpose integrated development environment (IDE) Open source Supported for Windows, Mac OS X, Linux.
Day 1 Session 2. Setup & Installation
Introduction to Android Programming
Android Mobile Application Development
Android 01: Fundamentals
Mobile Application Development BSCS-7 Lecture # 2
Android Runtime – Dalvik VM
Android Studio, Android System Basics and Git
Android.
Development-Introduction
CS323 Android Getting Started
Android Developer Fundamentals V2
Android Application Development
Android Platform, Android App Basic Components
Mobile Programming Dr. Mohsin Ali Memon.
Presentation transcript:

ANDROID PROGRAMMING MODULE 1 – GETTING STARTED DEPARTMENT OF COMPUTER SCIENCE IOWA STATE UNIVERSITY

ROADMAP Concepts Setting up the development environment. Android OS Android Programming Setting up the development environment. ADT Eclipse IDE SKD Manager Creating an Android Project More Concepts Activity Basic Structure of an Android Project Deployment ROADMAP

Concepts Android OS Android Programming Android is an operating system based on the Linux kernel, and designed primarily for touchscreen mobile devices such as smartphones and tablet computers. Android is open source and Google releases the source code under the Apache License. Android Programming Applications are usually developed in the Java programming language using the Android Software Development Kit, but other development tools are also available. Concepts

Setting up the Development Environment Download The Development Environment for Android Contains the following Components: Android Software Development Kit (SDK) Android Development Tool Plugin (ADT Plugin) Eclipse Integrated Development Environment (IDE) or some other IDE. Google also provides an SDK Manager to Keep the SDK up to date. To get these components go to http://developer.android.com/sdk/index.html and download the entire package including Eclipse for convenience. There are other options for development like the android studio IDE for developing Android Projects. You can use any tool you are convenient with, however in the modules Eclipse with ADT Plugin is used. Setting up the Development Environment Download

Setting up the Development Environment Android SDK and SDK Manager After Downloading the Package and extracting it. You will see that there are three items: The Android SDK is composed of modular packages that you can download separately using the Android SDK Manager. For example, when the SDK Tools are updated or a new version of the Android platform is released, you can use the SDK Manager to quickly download them to your environment. Setting up the Development Environment Android SDK and SDK Manager

Setting up the Development Environment Eclipse IDE with ADT Plugin Open the Eclipse folder which contains the Eclipse IDE files and click on the Application file named Eclipse. The first time one open’s the IDE, it requests to create a work space. Browse and select the folder to create the workspace where your projects will be saved. Setting up the Development Environment Eclipse IDE with ADT Plugin

Creating an Android Project Now the Workbench Opens and one can see the Java Perspective set by default in the top right corner of the window. To Create a new Android Project follow these steps. Select File -> New -> Android Application Project. Creating an Android Project Java Perspective

Creating an Android Project Application and Package Names In the New Android Application Dialog, provide the application name and package name and click next. One can leave the SDK versions unmodified for this project. Creating an Android Project Application and Package Names

Creating an Android Project Configure Project For the First Example Click Next in all the consecutive windows. The Configure Project Window provides the option of creating a custom launcher Icon for your App and create the Main Activity for your Application. The Main Activity is the point of entry into the application. Unlike other programming paradigms in which apps are launched with a main() method, the Android system initiates code in an Activity instance by invoking specific callback methods that correspond to specific stages of its lifecycle. Creating an Android Project Configure Project

Creating an Android Project Icon and Activity Click Next in the Configure Attribute for the icon art window In the Create Activity Window select Blank Activity and Click Next. A Blank Activity will be created in the project which display’s a “Hello World” string. Give a name for your blank activity in the Blank Activity Window and Click Finish. Creating an Android Project Icon and Activity

Creating an Android Project You have just created an android Project. But before deploying it in a Mobile Phone or an Emulator, let us look at the structure of the project created. Creating an Android Project Contents of Project

Structure of the Android Project src : Contains source files and packages. gen: Contains files generated on building the project. bin: Contains class files and the generated Application Package (apk) file. libs: Contains external libraries res: Contains resourses such as drawable , strings , layout and other resouses used by the application in the form of xml files. Android Manifest.xml : The manifest presents essential information about the application to the Android system, information the system must have before it can run any of the application's code. Structure of the Android Project

Android Manifest.xml The manifest does the following: It names the Java package for the application. The package name serves as a unique identifier for the application. It describes the components of the application — the activities, services, broadcast receivers, and content providers that the application is composed of. It names the classes that implement each of the components and publishes their capabilities. It declares which permissions the application must have in order to access protected parts of the API and interact with other applications. Eg: <uses-permission android:name="android.permission.INTERNET"/> It declares the minimum level of the Android API that the application requires. Eg: <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18" /> It lists the libraries that the application must be linked against. Android Manifest.xml

There are two ways to deploy an application, the first is using a physical device and the second is to run the application on a virtual device. Two Ways of Debugging Android Virtual Device Physical Device Does not support operations which require accessing the physical ports such as data port. No such Restriction. It has a poor response time which makes it a secondary option for testing. Easier and Faster to way of running the application Emulators can be provided simulated triggers by using Telnet. Easy to provide real time triggers such as receiving a text message or email. Multiple AVDs (Android Virtual Device) can be created for any version of the android OS. A single device can run only on version of the Android OS.

Android Emulator / Android Virtual Device What is an Emulator? An emulator is a software that duplicates (or emulates) the functions of one computer system in another computer system. In the case of an Android Emulator , the Emulator software closely resembles the behavior of the real Android Device. What is an Android Virtual Device (AVD)? As the name suggests it is a Virtual Device which emulates a real Android Device that runs the Android OS. It is an emulator configuration that lets you model an actual device by defining hardware and software options to be emulated by the Android Emulator. Android Emulator / Android Virtual Device

Follow these steps to first create an Android Virtual Device (AVD) in the Eclipse IDE with ADT Plugin. Go to the Window -> Android Virtual Device Manager. In the Android Virtual Devices tab, Click on New.. Or Go to the Device Definitions Tab and select a device and click on Create AVD. Setting up the AVD

Deploying an Application In AVD Now the Create New AVD window appears. Provide a Name for the AVD and complete the other Configuration options such ad the Android Version, Memory options etc. Click OK. Now the AVD is created. To start the emulator Open the AVD Manager and go to the AVDs tab. Select an AVD and click on Start.. (The emulator may take some time to load) Deploying an Application In AVD

Setting up the Physical Device In order to debug you application in a real Android Device, the device must have ‘Developer Options’ enabled. For each device this option can be enabled in different ways. For security reason, that this option may not be enabled by mistake it might be hidden. One can Search online in the Internet for a way to enable this option in one’s specific device. Setting up the Physical Device

Deploying an application In the Physical Device In order to run the application on your device. One can connect the device to the computer using a USB cable and then Click on Run As -> Android Application , and choose from the list of devices available. Deploying an application In the Physical Device

Deploying in the Physical Device Or one can build the Application by selecting Project-> Build Project , which will generate the Android Package file (.apk file) which will be available in the bin folder of the project, which can be transferred to your phone by some means (say email) and then installed in the Device. Deploying in the Physical Device

Deploying the Application Ensure Project -> Build Automatically is Selected. Now Click on the Project in the Package Explorer and Select Run-> Run As -> Android Application Now select the device /AVD to run the application on. Deploying the Application

Thank You!