By Philip Peng, 2011-01-12 For PennApps Mobile 2011, University of Pennsylvania All images used in this belong to their rightful owners (not me).

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.
Intro to Android Chris Risner. About Me Mobile Team Leader at Quicken Loans Co-Founder of Detroit GTUG
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.
Android Aims to bring Internet-style innovation and openness to mobile phones.
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 OPERATING SYSTEM Guided By,Presented By, Ajay B.N Somashekar B.T Asst Professor MTech 2 nd Sem (CE)Dept of CS & E.
Android and Project Structure. Android Android OS – Built on Linux Kernel – Phones – Netbooks – Readers – Other???
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.
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 **
Virtual Reality Course Slide  NTU Mobile HCI Lab, Mike Chen   Android Developers 
Getting Started with Android Programming Note: if you have already installed android development tools, please check that you have the same version as.
Android Tutorial Larry Walters OOSE Fall References This tutorial is a brief overview of some major concepts…Android is much richer and more complex.
© Frank Mueller & Seokyong Hong (TA) North Carolina State University Center for Efficient, Secure and Reliable Computing Android Installation Guide (2)
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 Introduction Platform Overview.
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.
Mobile Application Development with ANDROID. Agenda Mobile Application Development (MAD) Intro to Android platform Platform architecture Application building.
About me Yichuan Wang Android Basics Credit goes to Google and UMBC.
Android: versions Note that: Honeycomb (Android v3.0) A tablet-only release Jelly Bean (Android v4.1) Released on July 09, 2012.
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.
Android Programming By Mohsen Biglari Android Programming, Part1: Introduction 1 Part1: Introduction By Mohsen Biglari.
1 Mobile Computing Set Up Copyright 2015 by Janson Industries.
Introduction to Android Programming (CS5248 Fall 2015) Aditya Kulkarni August 26, 2015 *Based on slides from Paresh Mayami.
Operating system for mobile devices with a Java programming interface. Provides tools, e.g. a compiler, debugger, device emulator, and its own Java Virtual.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
01. Introduction to Android Prof. Oum Saokosal Master of Engineering in Information Systems, South Korea
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.
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
DUE Hello World on the Android Platform.
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.
Android Hello World 1. Click on Start and type eclipse into the textbox 2.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
Accelerometer based motion gestures for mobile devices Presented by – Neel Parikh Advisor Committee members Dr. Chris Pollett Dr. Robert Chun Dr. Mark.
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
Why Learn Android? Largest installation base of any operating system Over 20,000 Android devices exist Businesses will likely move more to device-based.
Introduction to Android Programming
Mobile Device Development
Android.
Development-Introduction
CS323 Android Getting Started
Application Development A Tutorial Driven Course
Korea Software HRD Center
Android Development Introduction to Android Development 2011/01/16
Presentation transcript:

By Philip Peng, For PennApps Mobile 2011, University of Pennsylvania All images used in this belong to their rightful owners (not me).

For PennApps Mobile 2011 Philip Peng, Why mobile? smartphones = “new thing” portable, powerful Why Android? (over iOS) Linux → Open Source Consumer-driven apps Hardware/software choice Google <3 Devs

For PennApps Mobile 2011 Philip Peng,

For PennApps Mobile 2011 Philip Peng,

Overview Java Eclipse Hello World Activity Cycle Try API Demos Stopwatch Example Logcat/DDMS Debugging Market Publishing and more... Beats and Useful Resource Links For PennApps Mobile 2011 Philip Peng,

For PennApps Mobile 2011 Philip Peng, Android Java Linux, but apps in Java Dalvik Virtual Machine – DVM.apk format ← Eclipse Standard java.* packages Custom graphics/UI code NDK – C/C++ for ARM (OpenGL ES 2.0, libraries, etc.)

For PennApps Mobile 2011 Philip Peng,

For PennApps Mobile 2011 Philip Peng, Eclipse FOSS, customizable, industry-standard Android-ready Download these (if you haven't already) Eclipse Classic e-classic-361/heliossr1 e-classic-361/heliossr1 Android SDK R8 (get the.zip) Java SE Development Kit 6u23 (JDK) wnloads/index.html wnloads/index.html Code Samples used ps/PennApps_AndroidStopwatch_src.zip ps/PennApps_AndroidStopwatch_src.zip

For PennApps Mobile 2011 Philip Peng, Setup (Live Demo!) Install JDK (run installer) Extract Eclipse (e.g. C:/Android/eclipse)C:/Android/eclipse Install Android SDK Extract Android SDK (e.g. C:/Android/android-sdk- windows)C:/Android/android-sdk- windows Run SDK Manager Select packages (only need Platform-tools, API 9, document, and samples) Download and wait (long) Virtual Devices > New Name: “TestPhone2.3”, Target: Android 2.3 – API Level 9, SD Card Size: 64 MiB Create AVD > Start... > Launch A virtual Android 2.3 phone for testing! Yay \o/

For PennApps Mobile 2011 Philip Peng, Setup (Live Demo! Continued) Install ADT Plugin for Eclipse: adt.html#installing adt.html#installing Help > Install New Software.... > Add → “ADT” Select All > Next > Next > Accept Terms > Finish > Restart Windows > Preferences... > Android Browse (find “android-sdk-windows” folder) > Apply > OK Eclipse is now ready for Android development! Ready for your Android “Hello World”?

For PennApps Mobile 2011 Philip Peng, Hello World File > New > Project > Android > Android Project

For PennApps Mobile 2011 Philip Peng, Hello World Add the following lines marked by “// <-----”

For PennApps Mobile 2011 Philip Peng, Hello World Run > Run > Android Application

For PennApps Mobile 2011 Philip Peng, Hello World Inspection Package naming convention? Activity, Layout, TextView? R, src, res, AndroidManifest?

For PennApps Mobile 2011 Philip Peng, Activity Cycle Activity = methods + Layout + Dialogs Layout = Views, Buttons, etc. App = many Activities Task = stack of Activities from one app Also: Services, Broadcast Receivers, Content Providers

For PennApps Mobile 2011 Philip Peng, API Demos File > New > Projects > Android Project Create project from existing source (C:\Android\android-sdk- windows\samples\android-9\ApiDemos) Right click ApiDemos project > Refresh src > com.examples.android.apis > ApiDemosApplication Run > Run > Android Application (or Ctrl+F5) Explore the demos! Ready to try it yourself?

For PennApps Mobile 2011 Philip Peng, Stopwatch 1 Hello World, but need time and screen updating FormattedTime.java and RefreshHandler.java FormattedTime start() - starts timer, returns “00:00:00” stop() - stops timer, returns time “MM:SS:mm” reset() - resets timer, returns “00:00:00” update() - returns time “MM:SS:mm” RefreshHandler start(delay) - starts calling update() every delay ms stop() - stops calling update() update() - override this with your code

For PennApps Mobile 2011 Philip Peng, Stopwatch A Hello World, with FormattedTime and RefreshHandler But this just keeps running, what about stopping or resetting?

For PennApps Mobile 2011 Philip Peng, Views, Images and Buttons, Oh My! Activity.setContextView(layout) Graphical layout → XML Add in Widgets or more Views ViewGroups: LinearLayout, TableLayout, RelativeLayout, ScrollView, ListView, GridView Widgets/Content Views: TextView, WebView,ImageView ImageButton, Button, Checkbox, EditText, RadioButton See Android documentation for details and more

For PennApps Mobile 2011 Philip Peng, Stopwatch B Buttons for Start, Stop, Reset Give TextView an id for reference Good practice: use strings.xml onClick → method Use GridView or other ViewGroups for nicer layout

For PennApps Mobile 2011 Philip Peng, Stopwatch B Cross-reference TextView (recast) onClick must be public void foo(View view)

For PennApps Mobile 2011 Philip Peng, Stopwatch C Lets add unnecessary stuff!

For PennApps Mobile 2011 Philip Peng,

For PennApps Mobile 2011 Philip Peng, More Common Stuff Graphics: → Static → XML layouts Active → Canvas 3D → OpenGL ES 1.x or 2.0 (NDK) Audio/Video: Playback → MediaPlayer Recording → MediaRecorder Data: Settings → PreferenceActivity & PreferenceManager Storage → External Storage, SQLite Network: Connectivity → ConnectivityManager Locations → Uri* Interactivity: Multiple activities → Intents Other apps/Content handling → Intent Filters

For PennApps Mobile 2011 Philip Peng, Debugging! Logcat!!! (and DDMS later) Log.v(String tag, String msg) Also Log.v,.w,.d,.wtf ADB android-sdk-*/platform-tools/adb adb push/pull/install adb shell adb logcat

For PennApps Mobile 2011 Philip Peng, DDMS (Dalvik Debug Monitor Server) Eclipse integrated Android debugger Windows > Open Perspective > Other... > DDMS Select device, select process Debug, Update Heap, Update Threads Allows inspection of threads, heap, allocation, files, etc. Also displays Logcat and allows for screenshots!

For PennApps Mobile 2011 Philip Peng,

For PennApps Mobile 2011 Philip Peng, Market and Actual Testing? Windows > Android SDK & AVD Manager Available packages > Third party Add-ons Google Usb Driver and Market Licensing On your actual phone: MENU > Settings > Applications > Development > USB debugging ON Plug in, compile and run your Android app, select your actual phone (or might auto-select)

For PennApps Mobile 2011 Philip Peng, Publishing on the Market hing/publishing.html hing/publishing.html $25 one-time fee for a developer account Make money back via either paid app or advertisements (AdMob) Compare to iOS's $99/YEAR and content filtering/approval-based system Need to make sure to check support for different screen sizes, Android OS (current is 2.3 but lots still run 1.5/1.6), etc. in AndroidManifest.xml file

For PennApps Mobile 2011 Philip Peng, Beats, Advanced Rhythm Game Website: Try it: Examples of: graphics, multi-touch, synchronized audio, menus, settings, dialogs, intent-filters, multiple activities, persistent data, multi-threading, file browser, and more... (screenshot taken Jan 12, 2011, prior to 1.4b release)

For PennApps Mobile 2011 Philip Peng, Useful Links/Resources #android-dev at freenode.irc.net Android Developers Dev Guide = fundamentals Reference = Google's Javadocs Resources = Tips and conventions Blog = Newest updates, code examples StackOverflow – public Q&A anddev.org – forums with lots of tutorials App Inventor Beta – Google's test project

For PennApps Mobile 2011 Philip Peng, Questions? Office Hours 8-10pm, Sat. Jan 16