23
Teaching Android App Development with Android How to Program Presented by Paul Deitel, CEO Deitel & Associates Co-Author of Android How to Program: An App- Driven Approach

Teaching Android App Development with

Embed Size (px)

Citation preview

Page 1: Teaching Android App Development with

Teaching Android App Development with Android How to Program

Presented by Paul Deitel, CEODeitel & AssociatesCo-Author of Android How to Program: An App-Driven Approach

Page 2: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Paul Deitel, CEO, Deitel & Associates Email: [email protected] Web: www.deitel.com Facebook: http://facebook.com/DeitelFan Google+: http://gplus.to/Deitel Twitter: @deitel LinkedIn:

http://linkedin.com/company/deitel-&-associates

Source Code Downloads for the Book:http://www.deitel.com/books/AndroidHTP

Page 3: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Agenda Android Quick Facts Prerequisites for Teaching/Learning Android App

Development Target Audiences for Android How to Program Android How to Program Overview Software Requirements & Setup Android Development Tools Overview Issues You May Encounter Teaching Tips Customer Service

Page 4: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Android Quick Facts Most widely used smartphone OS Powers 52% of the US smartphone market Phones, tablets, Google TV and more Current version is Android 4.1 (Jelly Bean),

but is only 1.8% of the market Version 2.2 is 12.9% of the installed base Versions 2.3.3-2.3.7 are 55.5% of the installed base Versions 4.0.3-4.0.4 are 23.7% of the installed base

Page 5: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Prerequisites You must know object-oriented Java programming You must know XML

Used in GUI design and app settings XML online tutorials

http://docs.oracle.com/javaee/1.4/tutorial/doc/IntroXML2.html

http://www.ibm.com/developerworks/xml/newto/ http://www.w3schools.com/xml/xml_whatis.asp http://www.deitel.com/articles/xml_tutorials/20060401/

XMLBasics/ http://www.deitel.com/articles/xml_tutorials/20060401/XM

LStructuringData/

Page 6: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Prerequisites Preparation time is essential

Build the apps yourself before teaching them developer.android.com is important

http://developer.android.com/develop/index.html Study the APIs/developer guides/sample code

Check out the new Android design guidelines http://developer.android.com/design/index.html

Page 7: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Target Audiences for Android How to Program Upper-level elective college courses and

industry professional courses for people familiar with object-oriented programming May or may not know Java

“Honors” or “accelerated” CS1 courses Schools that offer many sections of CS1 in Java could

offer one or two sections to ambitious students with prior programming experience and who want to work hard to master both Java and Android

Aggressively paced course

Page 8: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Android How to Program Overview Includes everything you need to teach

Android app development Created this book by combining

Android content from Android for Programmers Java content from Java How to Program, 9/e Adding short answer exercises for the Android

content Adding suggested projects for the Android

content

Page 9: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Android How to Program Overview App-Driven Approach

Concepts in the context of complete working apps

Each app chapter begins with introduction to the app test-drive technologies overview

Detailed code walkthrough of the app’s code Discusses the programming concepts Demonstrates the functionality of the Android APIs

Page 10: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Android How to Program Overview Thinking like a developer from the start

Build lots of real stuff and face the kinds of challenges professional developers must deal with

Online documentation and forums where you can find additional information Android Smartphone Apps

We cover many of the features included in the Android Software Development Kit (SDK), including Bluetooth, Google Maps, the Camera APIs, graphics APIs and support for multiple screen sizes and resolutions

Android Tablet Apps We cover many Android features for developing tablet apps, including

property animation, action bar and fragments Android Maps APIs

The Route Tracker App uses the Android Maps APIs which allow you to incorporate Google™ Maps in your app

Page 11: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Android How to Program Overview Multimedia

The apps use a broad range of Android multimedia capabilities, including graphics, images, frame-by-frame animation, property animation, audio, video, speech synthesis and speech recognition.

Android Best Practices We adhere to accepted Android best practices, pointing them out in the

detailed code walkthroughs Web Services

Web services allow you to use the web as an extraordinary collection of services—many of which are free

Chapter 11’s Route Tracker app uses the built-in Android Maps APIs to interact with the Google Maps web services

Chapter 14’s Weather Viewer app uses WeatherBug’s web services. The exercises encourage you to explore the vast array of available web services.

Page 12: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Android How to Program Java Content Objects and classes early helps novice readers master these

concepts more thoroughly before attempting the object-oriented Android material.

Introduces Java’s generic collections that are used frequently in our Android treatment and for which Android has some similar classes.

Introduces multithreading fundamentals, showing the features that we use in several of our Android apps—important for maintaining app responsiveness

Introduces Java GUI development—Android provides its own GUI components, so this appendix presents only a few Java GUI components, focussing on event-handling techniques that are used in all Android GUIs. The appendix introduces nested classes and anonymous inner classes, which are frequently used in Android programming.

Page 13: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Instructor Resources PowerPoint slides containing only the code and

figures in the text Test Item File of short-answer questions

True/False and Fill-in-the-Blank Solutions Manual

For both the Java and Android content, solutions to the end-of-chapter short-answer exercises

For the Java content, solutions are provided for most of the programming exercises

Solutions are not provided for the suggested Android app-development project exercises

Page 14: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Software Requirements & Setup Java SE 6 (not 7!) Development Kit

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Set the JAVA_HOME environment variable to ensure that the correct JDK is used

Eclipse IDE for Java Developers http://eclipse.org/downloads/ Eclipse 3.6.2 (Helios) or greater

Android SDK and ADT Plug-in http://developer.android.com/sdk/index.html

Page 15: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Software Requirements & Setup Install Java SE 6

Ensure that your PATH and JAVA_HOME are configured properly

Probably want to remove the CLASSPATH if your system has one

Extract Eclipse Run/Configure Eclipse

Specify where your workspace should be saved Tabs/Indentation/Line Numbers

Window > Preferences > General > Editors > Text Editors Mac: Preferences option is under the Eclipse menu

Page 16: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Software Requirements & Setup Install the Android SDK

http://developer.android.com/sdk/installing/index.html

Contains only the tools, not the platforms/APIs Installer will tell you which version of Java it

discovered; if it’s not the Java SE 6 SDK, you MUST correct that before continuing On Windows, install to c:\android-sdk—

sometimes paths with spaces cause issues

Page 17: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Software Requirements & Setup Install the Platforms

http://developer.android.com/sdk/installing/adding-packages.html

Run the SDK Manager Our book uses Android 2.3.3 through 3.2

Consider installing 4.x too Install the ADT Plugin

http://developer.android.com/sdk/installing/installing-adt.html Set up AVDs for Testing

Should have at least one smartphone and one tablet AVD For real development, you’d have many so you can emulate a

wide range of real devices

Page 18: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Android Development Tools Overview Eclipse IDE ADT Plug-In Android Emulator and AVDs Using real Android devices

On Windows, you might need to download and install USB drivers for the specific device

Must enable debugging on the device

Page 19: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Issues You May Encounter Wrong version of Java

May need to set up JAVA_HOME environment variable Eclipse can’t find the Android SDK

Set location in Window > Preferences > Android Wrong Eclipse Java compiler compliance level

Set in Window > Preferences > Java > Compiler Updated tools

The Android development tools update frequently Steps in any book are likely to be out-of-date quickly

XML files open in the wrong editor Right click the file and select the appropriate editor

AVD won’t launch May need to use the command line emulator tools in the Android SDK’s

tools folder to launch

Page 20: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Teaching Tips Ensure that your students understand Java OO

programming before getting into Android Open your AVDs before you begin your lecture—they

take a very long time to load! Test drive the app in an AVD or on an actual Android

device so the students understand the app’s purpose—remember, some features are available only on devices

Overview the technologies that will be used in the app to give the students some context

Devices are always the fastest way to test apps

Page 21: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Teaching Tips Developing an app can take weeks or

months Have students work in teams

Stanford Facebook app development course http://www.stanford.edu/group/captology/cgi-bin/fa

cebook/ Students worked in teams developing apps, some

of which landed in Facebook’s top 10, earning some of the student developers millions of dollars

Course gained wide recognition for encouraging student creativity and teamwork

Page 22: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Customer Service We're here to help! Send comments and suggestions—

these help us improve future editions

Page 23: Teaching Android App Development with

© Copyright 2012 by Deitel & Associates, Inc. All Rights Reserved.

Contact Us! Email:

[email protected] [email protected]

Web: http://www.deitel.com Facebook: http://facebook.com/DeitelFan Google+: http://gplus.to/Deitel Twitter: @deitel LinkedIn:

http://linkedin.com/company/deitel-&-associates Code Downloads:

http://www.deitel.com/books/AndroidHTP