Beruflich Dokumente
Kultur Dokumente
Android
What is Android?
0 What comes to your mind?
0 Two things:
0 Operating System for Mobile phones
0 Open Source
(http://source.android.com)
0 Intersection of OSS and cool, easy to program gadgets
Architecture
Android Framework
Dalvik VM
Native Libraries
Linux
Vocabulary
Resource
Activity
0 A single screen in an android app
0 An app is composed of one or more activities
0 Changing an activity:
0 Hardware buttons
0 Software (Coding)
Intent
0 Facilitates activity to activity communication
0 Basically, its a code to accomplish a verb like take a
Java JDK
0 Google Java JDK
0 Go to the first link
0 Download the latest version of Java JDK
Eclipse IDE
0 Google Eclipse
0 Go to the first link and click on Downloads
0 Download the latest version of Eclipse Classic
Android SDK
0 Google Android SDK
0 Go to the first link
0 Download Windows Installer (.exe file)
0 Set your default browser at no proxy
0 Run the above downloaded exe file and let it
Introduction to Eclipse
Workspace
Editor
AVD Manager
Introduction to JAVA
Ubuntu Editor)
0 GCC (Compiles to a
.out file)
0 Code needs to be
changed for
different platform
(runs directly on
OS)
JAVA
0 Eclipse (Popular
Java Editor)
0 JAVAC (Complies to
a .class file)
0 Code is platform
independent (runs
in a VM)
Java on Android
0 VM used is optimized for Android (Dalvik VM)
0 Java files are compiled to .dex file (compatible with
Dalvik VM)
Java Basics
0 Java is composed of classes.
0 All the classes in a project are in a single package
0 package com.example.first;
0 public class Example 1{
Android Architecture.
Java Basics
0 Use extends Activity keyword to make an Activity
(Automatically generated)
You will
0 Learn how to work with Eclipse
0 Learn your way around an android project
0 Get familiar with activities and intents
0 Make a flashlight app
Steps
0 Make the background red and bring a label red at the
center
0 Make a green button
0 Make a second activity
0 Make an intent