Académique Documents
Professionnel Documents
Culture Documents
Developing
Developing
Developing
Developing
JDK Eclipse - Classic version is recommended
Android SDK
ADT Plugin for Eclipse Subclipse(support for Subversion)
Developing
SDK Manager(AT LEAST ONE PLATFORM!)
Get projects from SVN Add Virtual Devices Set up Hardware Devices(Google USB driver)
Developing
Application Fundamentals
multi-user Linux system in which each application is a different user. Unique: ID(system), permissions, VM, process.
Code
.apk
Application Project
Components
Properties
Libraries
Manifest
Resources
Application Project
Components
Properties
Libraries
Manifest
Resources
Application Components
Activities
UI Life Cycle Back Stack Long Running Dont provide UI SAME thread, SAME process
Store and retrieve data Only way to share data between apps
Application Components
Activities
UI Life Cycle Back Stack Long Running Dont provide UI SAME thread, SAME process
Store and retrieve data Only way to share data between apps
Activities - UI
Hierarchy of Views
Widgets & Layouts XML layout file & activity code Input events
Intents
Abstract description of an operation to be performed. startActivity to launch an Activity, broadcastIntent to send it to BroadcastReceiver components startService(Intent) or bindService(Intent, ServiceConnection, int) to start or communicate with a background Service.
1. Do not block the UI thread 2. Do not access the Android UI toolkit from outside the UI thread
Data Storage
Shared Preferences Internal Storage External Storage SQLite Databases Network Connection
Private primitive data Key-value pairs
Private data Device memory Public data Shared storage
Manifest File
It names the Java package for the application It describes the components of the application It determines which processes will host application components. It declares the application permissions. It declares the minimum level of the Android API that the application requires. It lists the libraries that the application must be linked against.
Developing
Eclipse
Perspectives:
o Team Sync.: add, synchronize, commit
Remember
Keep develop environments updated!
Caution when commiting /bin directories Name the main packages properly: com.mecomo.<app name> , the package name serves as a unique identifier for the application. Stack Overflow RULES!
TIPS - PROBLEMS
Compiling problems: resource files, imports.
Running problems: manifest file, project properties. Unbelivable problems: disconnect device, uninstall app manually, restart eclipse, clean/build project -> PROBLEM SOLVED!
TIPS - SHORTCUTS
CTRL + M = toggle focus on main screen CTRL + 7 = toggle comments in selected text CTRL + SPACE = suggestions CTRL + SHIFT + / or * = retracts/expands code CTRL + SHIFT + F = auto-ident code ALT + SHIFT + Z = templates ALT + SHIFT + R = rename(refactor)
Links
http://developer.android.com/sdk/installing.ht ml http://developer.android.com/sdk/win-usb.html http://developer.android.com/videos/index.ht ml#v=fL6gSd4ugSI life cycle video http://developer.android.com/guide/index.htm l http://android-developers.blogspot.com/ http://stackoverflow.com/questions/tagged/an droid