Intro to Android Development. Getting started 1.Install Android SDK (includes Eclipse; 2.If using Windows.

Slides:



Advertisements
Similar presentations
Android Application Development A Tutorial Driven Course.
Advertisements

Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Scienze dellInformazione Università di Bologna.
ANDROID DEVELOPMENT KELLY MCBEAN. DEVELOPMENT ENVIRONMENT OVERVIEW Eclipse Standard IDE for Developing Android Applications Install: 1.Java (JDK) – Since.
Android OS : Core Concepts Dr. Jeyakesavan Veerasamy Sr. Lecturer University of Texas at Dallas
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna.
All About Android Introduction to Android 1. Creating a New App “These aren’t the droids we’re looking for.” Obi-wan Kenobi 1. Bring up Eclipse. 2. Click.
Hello world Follow steps under the sections “Create an AVD” and “Create a New Android Project” at
Get android development environment running. Install – Get and install JDK 5 or 6 (see link in the.
Filip Debelić What is it? Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google Android,
Coursework 2: getting started (4) – using PhoneGap to build mobile applications (optional) Chris Greenhalgh G54UBI /
Android: Hello World Frank Xu Gannon University. Steps Configuration ▫Android SDK ▫Android Development Tools (ADT)  Eclipse plug-in ▫Android SDK and.
Android Programming Beomjoo Seo Sep., 12 CS5248 Fall 2012.
2. Setting Up Your Android Development Environment.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
UFCFX5-15-3Mobile Device Development Android Development Environments and Windows.
SET UP COMPUTER ** PLEASE BE AWARE SCREENSHOTS MAY NOT MATCH **
Getting Started with Android Programming Note: if you have already installed android development tools, please check that you have the same version as.
INTERNATIONAL SUMMER ACADEMIC COURSE UNIVESITY OF NIS ISAC – Android programming.
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
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.
Better reference the original webpage :
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
Mobile Application Development with ANDROID Tejas Lagvankar UMBC 29 April 2009.
About me Yichuan Wang Android Basics Credit goes to Google and UMBC.
Android 6: Testing and Running the App Kirk Scott 1.
 Understanding an activity  Starting an activity  Passing information between activities  Understanding intents  Understanding the activity lifecycle.
CS5103 Software Engineering Lecture 08 Android Development II.
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
1 Mobile Computing Set Up Copyright 2015 by Janson Industries.
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
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.
1 IMPORTANT NOTE  IMPORTANT NOTE not  As of this writing the default project you will download, import and use in this class is not enabled for Tomcat.
Basic Android Tutorial USF’s Association for Computing Machinery.
Rajab Davudov. Agenda Eclipse, ADT and Android SDK APK file Fundamentals – Activity – Service – Content Provider – Broadcast Receiver – Intent Hello World.
Android for Java Developers Denver Java Users Group Jan 11, Mike
Eclipse Tutorial Barrett Summer Scholars 2011 Sustainable Engineering: Learning to Engineer Truly Green Products.
© 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.
INTRODUCTION TO ANDROID. Slide 2 Application Components An Android application is made of up one or more of the following components Activities We will.
Presented By: Muhammad Tariq Software Engineer Android Training course.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
GumTree Development Environment Setup Windows Only Compatible with Eclipse 3.2 M3 (Last update: 16/11/05)
Liferay Installation Prepared by: Do Xuan Hai 8 August 2011.
First Venture into the Android World Chapter 1 Part 2.
Mobile Programming Lecture 3 Debugging. Lecture 2 Review What widget would you use to allow the user to enter o a yes/no value o a range of values from.
Chapter 1 Getting Started With Dreamweaver. Exploring the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
Android 2: A First Project Kirk Scott Creating a New, Example Android Application Project in Eclipse 2.2 Creating a Virtual Device, an Emulator.
PART 2 INTRODUCTION TO DYNAMIC WEB CONTENT AND PHP.
® IBM Software Group © 2009 IBM CorporationLast Update: 5/27/2009 Setup Guide for the RUI EGL Distance Learning Course RBD v7.5.1 Workstation.
ANDROID APPLICATION DEVELOPMENT. ANDROID DEVELOPMENT DEVELOPER.ANDROID.COM/INDEX.HTML THE OFFICIAL SITE FOR ANDROID DEVELOPERS. PROVIDES THE ANDROID SDK.
1 Android Development Lean and mean introduction Based on a presentation by Mihail L. Sichitiu.
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
Intoduction to Andriod studio Environment With a hello world program.
Intro to. Windows – Mac – osx
INTRODUCTION TO ANDROID. Slide 2 Introduction I take a top-down approach to describing an application’s anatomy.
Guide To Develop Mobile Apps With Titanium. Agenda Overview Installation of Platform SDKs Pros of Appcelerator Titanium Cons of Appcelerator Titanium.
Day 1 Session 2. Setup & Installation
Introduction to Android Programming
Mobile Device Development
Development Environment
Obtaining the Required Tools
Android.
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
CS323 Android Getting Started
CS5103 Software Engineering
Application Development A Tutorial Driven Course
Android Application Development
Presentation transcript:

Intro to Android Development

Getting started 1.Install Android SDK (includes Eclipse; 2.If using Windows & eclipse & Samsung Galaxy, install Galaxy driver. – Install Samsung Kies application. Download from Do not check Unified Driver Installer. – No need to install Galaxy drivers when using Linux + eclipse.

Download Albie (AIMv1). 1.First, make sure that your Eclipse Java ADT is installed and running correctly. – File -> New -> Android Application Project. – Call it Test and make sure you can build and run it. 2.Unzip aimv1.zip but do not unzip it directly into the eclipse workspace. – The directory, AIMv1, will be created. 3.File --> Import... – Expand Android folder. – Select 'Existing Android Code Into Workspace.' – Next.

Download Albie (continued). 4.Use Browse to find the Root Directory which is AIMv1 (unzipped above). – Check 'Copy projects into workspace.' – Finish. 5.The AIMv1 folder should now appear in the eclipse Package Explorer. 6.You may ignore the error message, "Unable to resolve target 'android-#.'"

Download Albie (continued). 7.Start with a fresh build by doing the following: – Select AIMv1 in Package Explorer. – Project -> Clean – Run -> Run As -> Android Application Ignore any and all directories/folders with CVS in the name.

ac·tiv·i·ty [ak-tiv-i-tee] – noun, plural ac·tiv·i·ties. 1.the state or quality of being active: There was not much activity in the stock market today. He doesn't have enough physical activity in his life. 2.a specific deed, action, function, or sphere of action: social activities. 3.work, especially in elementary grades at school, that involves direct experience by the student rather than textbook study. 4.energetic activity; animation; liveliness. 5.a use of energy or force; an active movement or operation. from

Definition: Activity Activity – “An application usually consists of multiple activities that are loosely bound to each other. – Typically, one activity in an application is specified as the "main" activity, which is presented to the user when launching the application for the first time. – Each activity can then start another activity in order to perform different actions.” developer.android.com/guide/components/activities.html

Definition: Activity Activity – “An Activity is an application component that provides a screen with which users can interact in order to do something, such as dial the phone, take a photo, send an , or view a map. – Each activity is given a window in which to draw its user interface. – The window typically fills the screen, but may be smaller than the screen and float on top of other windows.” Ibid. (That’s fancy! I’m working on using op. cit.)

Associated with the main activity is an XML file that describes its UI layout.

Definition: Activity Activity – “Each time a new activity starts, the previous activity is stopped, but the system preserves the activity in a stack (the "back stack"). – When a new activity starts, it is pushed onto the back stack and takes user focus. – The back stack abides to the basic "last in, first out" stack mechanism, so, when the user is done with the current activity and presses the Back button, it is popped from the stack (and destroyed) and the previous activity resumes.” Ibid.

These Java files are automatically generated. Do not edit them!

Layouts 1.AbsoluteLayout 2.DrawerLayout 3.FrameLayout 4.GridLayout 5.GridView 6.LinearLayout 7.ListView 8.RelativeLayout 9.SlidingPaneLayout 10.WebView

XML

xml – extensible markup language Example: <shiporderorderid="889923" xmlns:xsi=" xsi:noNamespaceSchemaLocation="shiporder.xsd"> John Smith <shiptoname="Ola Nordmann" address="Langgt 23" city="4000 Stavanger" country="Norway“ /> Empire Burlesque Special Edition Hide your heart prolog

xml – extensible markup language Example: <shiporderorderid="889923" xmlns:xsi=" xsi:noNamespaceSchemaLocation="shiporder.xsd"> John Smith <shiptoname="Ola Nordmann" address="Langgt 23" city="4000 Stavanger" country="Norway“ /> Empire Burlesque Special Edition Hide your heart start tag end tag

xml – extensible markup language Example: <shiporderorderid="889923" xmlns:xsi=" xsi:noNamespaceSchemaLocation="shiporder.xsd"> John Smith <shiptoname="Ola Nordmann" address="Langgt 23" city="4000 Stavanger" country="Norway“ /> Empire Burlesque Special Edition Hide your heart tags w/ contents: item tag has contents. title, note, quantity, and price tags also have contents.

xml – extensible markup language Example: <shiporderorderid="889923" xmlns:xsi=" xsi:noNamespaceSchemaLocation="shiporder.xsd"> John Smith <shiptoname="Ola Nordmann" address="Langgt 23" city="4000 Stavanger" country="Norway“ /> Empire Burlesque Special Edition Hide your heart empty tag (no end tag).

xml – extensible markup language Example: <shiporderorderid="889923" xmlns:xsi=" xsi:noNamespaceSchemaLocation="shiporder.xsd"> John Smith <shiptoname="Ola Nordmann" address="Langgt 23" city="4000 Stavanger" country="Norway“ /> Empire Burlesque Special Edition Hide your heart attribute name attribute value

xml – extensible markup language Example: <shiporderorderid="889923" xmlns:xsi=" xsi:noNamespaceSchemaLocation="shiporder.xsd"> John Smith <shiptoname="Ola Nordmann" address="Langgt 23" city="4000 Stavanger" country="Norway“ /> Empire Burlesque Special Edition Hide your heart Note: The shiporder tag has both attributes and contents.

The manifest lists and contains information about all of the activities in the application.

XML AND LAYOUTS

SETTING UP THE ANDROID DEVELOPMENT ENVIRONMENT

Setup on PC 1.Install eclipse + android (see – Instructions are there if eclipse is already installed. 2.Enable virtualization in BIOS. – On a Lenovo T510, press F1 when you see the “ThinkVantage” message.

Setup on PC Two ways to run Android apps: 1.Create a virtual device. Note: It takes some time for the emulator to start. So don’t close it once it starts! (Use the ‘back’ button to stop you application.) 2.Use a real android device. BEST!

Setup on PC for Galaxy Install the Android USB driver for Samsung. – First, install Samsung Kies software. This will take some time (~1 hour). Then it will update itself again. – Then plug in the Galaxy; your laptop will install a number of drivers. – If all is well, when you run adb devices on your laptop, you will see your device listed.

Steps to run your Android application 1.Right-click on the name of your project in the Project Explorer pane. 2.Choose your Android device (or virtual device). (See next slide.)

Setup

Setup on Android device Setting --> Security --> Unknown source – Make sure it’s checked. Settings --> Developer options --> USB debugging – Make sure it’s checked.

Comments about layouts Layouts may be nested/hierarchical. See android.com/2010/01/05/android-layout- tutorial/ for a layout tutorial. android.com/2010/01/05/android-layout- tutorial/

HOW TO LOG MESSAGES FOR DEBUGGING

Writing to the log import android.util.Log; … Log.v( "andy1", "MainActivity.sendMessage: hello" ); d – debug e – error i – information v – verbose w – warning

Accessing the log file via eclipse

ANDROID WIDGETS

Android widget classes More than 100! – See summary.html. summary.html Button EditText ImageButton ImageView NumberPicker PopupMenu RadioButton, RadioGroup Toast ToggleButton

LAYOUT EDITOR

Palette contents disappear when Show Previews is selected (default)

Summary Activity – app/Activity.html app/Activity.html Intent – content/Intent.html content/Intent.html

References developer.android.com/guide/topics/ui/declaring-layout.html developer.android.com/guide/topics/ui/layout/linear.html; developer.android.com/reference/android/widget/LinearLayout.html developer.android.com/guide/topics/ui/layout/relative.html; developer.android.com/reference/android/widget/RelativeLayout.html developer.android.com/guide/webapps/webview.html; developer.android.com/reference/android/webkit/WebView.html developer.android.com/guide/topics/ui/layout/listview.html; developer.android.com/guide/topics/ui/layout/gridview.html; summary.html

How to disable the native Android browser (not Firefox, etc.) from “going mobile.” 1.Open browser 2.Type "about:debug" in the address bar. Press "go.“ Nothing will happen, this will only enable more options in the menu. 3.Go to menu. (Notice ‘Dump V8 counters’ at bottom.) 4.Choose Settings -> Debug -> UAString. 5.Select "desktop."