Development-Introduction Android Application Development-Introduction
Overview What is Android? Why teach Android? What do you need in order to learn Android? Hello, Android
What is Android?
What is Android? An open source Linux-based operating system intended for mobile computing platforms Includes a Java API for developing applications It is not a device or product
Why teach Android?
Mobile Application development Smart Phones Internet access anywhere Social networking Millions of mobile users Open standards
Android vs. iPhone Java vs. Objective-C Direct install vs. Marketplace vs. App Store Open source?
What Should Students Already Know? Java! inheritance, method overriding interfaces, casting exceptions debugging reading API documentation
Do I Need Phones? You can use emulator-the emulator that is part of the Android toolset for Eclipse is quite good (though a bit slow) You can use real phones to test
Skills Will Students Learn? Separation of UI design and functionality XML and resource files Events and Listeners Callback methods Threads
Online Resources developer.android.com code.google.com/p/apps-for-android/ stackoverflow.com videos from Google I/O conferences
“Hello, Android”
Creating Your First Android App Set up development environment Create Android project Run it in the emulator
1. Developing tools Install Android Studio Install Android SDK (Android libraries) Install ADT plugin (Android development tools) Create AVD (Android virtual device) https://developer.android.com/studio/install.html
Setup up Android Studio
Setup up Android Studio
Setup up Android Studio
Setup up Android Studio
Setup up Android Studio
New Project
New Project
New Project
New Project
New Project
New Project
Project Structure Each project in Android Studio contains one or more modules with source code files and resource files. Types of modules include: Android app modules Library modules Google App Engine modules Each app module contains the following folders: Manifests:Contains the AndroidManifest.xml file. Java:Contains the java source code files,including Junit test code. Res:Contains all non-code resources,such as xml layouts,UI strings, and bitmap images.
3. Run the Android Application Run → Run (or click the “Run” button) Select “Android Application” The emulator may take a few minutes to start, so be patient! You don't need to restart the emulator when you have a new version of your application
select Run > Create Virtual Device
Choose Virtual Device
Choose Virtual Device
Run on the emulator
Run on a Real Device 1.install the Android USB device driver 2.plug the device into computer using USB cable