1. 首页
  2. 文档大全

Tutorial Programming in Java for Android Development

上传者:e****s 2022-07-08 16:51:56上传 PPT文件 8.83MB
Tutorial Programming in Java for Android Development_第1页 Tutorial Programming in Java for Android Development_第2页 Tutorial Programming in Java for Android Development_第3页

《Tutorial Programming in Java for Android Development》由会员分享,可在线阅读,更多相关《Tutorial Programming in Java for Android Development(37页珍藏版)》请在文档大全上搜索。

1、Android Programming: Setup for Android DevelopmentBased on material from Adam Champion, Xinfeng Li, C. Horstmann 1, J. Bloch 2, C. Collins et al. 4, M.L. Sichitiu (NCSU), V. Janjic (Imperial College London), CSE 2221 (OSU), and other sources1Outline Introduction to Android Getting Started Android Pr

2、ogramming2Introduction to Android Popular mobile device OS: 52% of U.S. smartphone market 8 Developed by Open Handset Alliance, led by Google Google claims 900,000 Android device activations 9Source: 83What is Android Android is an operating system for mobile devices such as smartphones and tablet c

3、omputers. It is developed by the Open Handset Alliance led by Google. Android has beaten Apple iOS, being the leading mobile operating system from first quarter of 2011 Version: Android 1.0, 1.1 to 1.5 (Cupcake), 1.6 (Donut), 2.0/2.1 (Eclair), 2.2 (Froyo), 2.3 (Gingerbread), to 3.0 (Honeycomb), 4.0

4、(Ice Cream Sandwich), 5.0 (Lollipop)Android ArchitectureOutline Introduction to Android Getting Started Android Programming6Getting Started (1) Need to install Java Development Kit (JDK) to write Java (and Android) programs Do not install Java Runtime Environment (JRE); JDK and JRE are different! Ca

5、n download the JDK for your OS at Alternatively, for OS X, Linux: OS X: Open Type javac at command line Install Java when prompt appears Linux: Type sudo aptget install defaultjdk at command line (Debian, Ubuntu) Other distributions: consult distributions documentation7Install!8Getting Started (2) A

6、fter installing JDK, download Android SDK from Simplest: download and install Android Studio bundle (including Android SDK) for your OS Alternatives: Download/install Android Developer Tools from this site (based on Eclipse) Install Android SDK tools by themselves, then install ADT for Eclipse separ

7、ately (from this site) Well use Android Studio with SDK included (easy)9Install!10Getting Started (3)Install Android Studio directly (Windows, Mac); unzip to directory android-studio, then run (Linux)You should see this:11Getting Started (4) Strongly recommend testing with real Android device Androi

8、d emulator: very slow Faster emulator: Genymotion 14, 15 Install USB drivers for your Android device! Bring up the Android SDK Manager Recommended: Install Android 2.2, 2.3.3 APIs and 4.x API Do not worry about Intel x86 Atom, MIPS system imagesSettingsNow youre ready for Android development!12Outli

9、ne Introduction to Android Getting Started Android Programming1314Android Highlights (1) Android apps execute on Dalvik VM, a “clean-room” implementation of JVM Dalvik optimized for efficient execution Dalvik: register-based VM, unlike Oracles stack-based JVM Java .class bytecode translated to Dalvi

10、k EXecutable (DEX) bytecode, which Dalvik interprets15Android Highlights (2) Android apps written in Java 5 Actually, a Java dialect (Apache Harmony) Everything weve learned still holds Apps use four main components: Activity: A “single screen” thats visible to user Service: Long-running background

11、“part” of app (not separate process or thread) ContentProvider: Manages app data (usually stored in database) and data access for queries BroadcastReceiver: Component that listens for particular Android system “events”, e.g., “found wireless device”, and responds accordingly16App Manifest Every Andr


文档来源:https://www.renrendoc.com/paper/212693093.html

文档标签:

下载地址