Android Programming Beomjoo Seo Sep., 12 CS5248 Fall 2012.

Slides:



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

Ando-it-yourself droid Praveen Kumar Pendyala. Outline Brief intro to the Droid developement Setting up the Life saviors - Development tools Hello Droid.
Android OS : Core Concepts Dr. Jeyakesavan Veerasamy Sr. Lecturer University of Texas at Dallas
Joemarie Comeros Amparo Android Development Orientation for Starters.
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna.
Get android development environment running. Install – Get and install JDK 5 or 6 (see link in the.
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,
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: Hello World Frank Xu Gannon University. Steps Configuration ▫Android SDK ▫Android Development Tools (ADT)  Eclipse plug-in ▫Android SDK and.
2. Setting Up Your Android Development Environment.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
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
Eclipse IDE. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as teaching.
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.
SEEM4570: XAMPP, Eclipse, Summary of Html Kangfei Zhao Room 711,ERB
Android Programming Day best Android Apps Lzo&feature=fvwrel.
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,
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.
Introduction to Android Programming (CS5248 Fall 2015) Aditya Kulkarni August 26, 2015 *Based on slides from Paresh Mayami.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Android Info mostly based on Pro Android 3.  User Applications  Java Libraries – most of Java standard edition ◦ Activities/Services ◦ UI/Graphics/View.
Prerequisites Android Studio – io.html io.html Java.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
Ali Shahrokni Application Components Activities Services Content providers Broadcast receivers.
Presentation Seminar on “IMAGE SLIDER –AN ANDROID APPLICATION”
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
Rajab Davudov. Agenda Eclipse, ADT and Android SDK APK file Fundamentals – Activity – Service – Content Provider – Broadcast Receiver – Intent Hello World.
DUE Hello World on the Android Platform.
Android for Java Developers Denver Java Users Group Jan 11, Mike
Presented By: Muhammad Tariq Software Engineer Android Training course.
Plug-in Development Environment. Session Outline Tools Installation Configuration New Project Basic Debugging Remote Debugging.
INTRODUCTION TO ANDROID. Slide 2 Application Components An Android application is made of up one or more of the following components Activities We will.
Android Boot Camp for Developers Using Java, 3E
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.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
1 Android Introduction Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
ANDROID APPLICATION DEVELOPMENT. ANDROID DEVELOPMENT DEVELOPER.ANDROID.COM/INDEX.HTML THE OFFICIAL SITE FOR ANDROID DEVELOPERS. PROVIDES THE ANDROID SDK.
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
Visual Programming Borland Delphi. Developing Applications Borland Delphi is an object-oriented, visual programming environment to develop 32-bit applications.
INTRODUCTION TO ANDROID. Slide 2 Introduction I take a top-down approach to describing an application’s anatomy.
Android apps development - Eclipse, Android SDK, and ADT plugin Introduction of.
Introduction to Android Programming
Intro To Android Programming
Mobile Device Development
Android Application Development 1 6 May 2018
Obtaining the Required Tools
Android Studio, Android System Basics and Git
Android.
Development-Introduction
CMPE419 Mobile Application Development
Anatomy of an Android Application
CS323 Android Getting Started
Application Development A Tutorial Driven Course
Android Developer Fundamentals V2
Korea Software HRD Center
Emerging Platform#3 Android & Programming an App
CMPE419 Mobile Application Development
Presentation transcript:

Android Programming Beomjoo Seo Sep., 12 CS5248 Fall 2012

Contents Installation Example by a sample app, “Hello, CS5284” – Create an Android Project – Building and Running – Debugging General Topics – Fundamental Components Activity, Service, Content Providers, and Broadcast Receiver – Activity, Intent – UI : Layout, Menu – Thread – Misc: Media Recorder, HTTP Post, MP4Parser Sample Application

Installation Procedure Install JDK 5 or JDK 6 Install Eclipse IDE – Eclipse 3.5 or above Eclipse JDT plugin – Run Android SDK starter package – Install ADT plugin (ADT ) Eclipse > Help > Install New Software … -> Add – Configure ADT plugin Eclipse IDE for Java (EE) Developers

Install SDK Packages From Android SDK and AVD Manager Via consoleORvia eclipse

SDK Version Mapping Convention Android Platform – SDK Tools, Revision 20 – API Level: 15

Eclipse ADT Plugin Configuration Specify Android SDK locationIncrease ADT connection time out At Windows > Preferences > Android

Creating a Sample App, “Hello, CS5248”

Eclipse > New > Android Project

Main Activity Class

Graphical Layout Editor Update ADT plugin !!!

XML Layout File

Value Resources - Strings.xml

R.java

The Manifest file

Default.properties

Building App

Building Process Running

No Android Device ? Install USB Driver !!!

1.Install OEM USB Driver from ASUS website. and search by Transformer 2.Update Driver Software from Device Manager 3.Locate USB Driver folder 4.Enable USB Debugging at Transformer USB Driver Installation Update Driver software

Enabling USB debugging OR

After Successful USB Driver Installation /tools/ddms.bat OR

Running Sample App.

Sample Hello World Code

Editing Sample Code BE PATIENT Since Eclipse may not be responsive for a long time !!! Add id to main.xml Edit HelloWorldActivity.java

Let’s Debug the code

A Sample Code

App Failure

Always, Look at DDMS !!!

Correction

Debugging via Dalvik Debug Monitor (ddms) Log.e("Hello, World", "Hello, BJ");

Now, everything is ready

Application Components Android application –.apk : android package Four Application Components – Activity A single screen with a user interface – Service A background processing unit with no user interface – Content Provider – Broadcast Receiver Communication among components except Content Provider – Intent

Activity 1 Activity Lifecycle Implement Lifecycle Callbacks

Activity 2 Hierarchical View Architecture – ViewGroup (Layout) View ViewGroup (Layout) – View – … View ViewGroup – … Declare Activity in the manifest

Activity 3 Start an Activity Start an Activity for a Result – Caller Activity – Callee Activity finish Activities and Stack

UI – Declaring Layout Initiated when called setContentView() on onCreate() Use Visual Layout Editor for initial layout design. Edit XML file extensively. wrap_content or fill_parent

UI – Creating Menu Menu Types – Options Menu Appears when a user touches MENU button. – Context Menu – Submenu How to – Specify menu items in a XML resource menu – Inflate a Menu Resource – Respond to user Action At res/menu/game_menu.xmlinflate callback

UI – Handling UI Events onClick, onLongClick, onKey, onTouch, …

Thread UI Thread – “Main” thread per application responsible for interacting with UI components. “Application Not Responding” problem – If UI thread is blocked more than several seconds, ANR dialog appears. – Do not block the UI thread – Do not access UI components outside UI thread. modify

Use AsyncTask, Instead

Misc - Media Recorder Modify CameraPreview to see the video during recording.

Misc - HTTP Post Use HttpClient and HttpPost. Use “multi-part/form-data” to encapsulate segment. Do not allocate memory excessively.

Misc - Integration with MP4Parser Adding a jar file – Create its jar file. – Add jar file to the app. Build Path > Configure Build Path > Libraries > Add JARs. If you include source files directly, – Put Isoparser-default.properties to assets folder – Change getResourceAsStream(“isoparser- default.properties”) in PropertyBoxParserImpl to “/assets/isoparser-default.properties”.

Misc - Connecting to NUS Wifi

Misc – Permission Issue Add following permissions to the manifest file.

Sample Implementation MainActivity RecordActivity Upload Service PlayerActivity Option menuContext menu Record Record Button Click Preview Item ClickUpload Item Click

Final Comment: Use ApiDemo !!!