Android Application Development android cs uchicago edu Adam

  • Slides: 46
Download presentation
Android Application Development android. cs. uchicago. edu

Android Application Development android. cs. uchicago. edu

Adam Gerber, Ph. D, SCJP Some of my mobile work: http: //www. flickr. com/photos/89831807@N

Adam Gerber, Ph. D, SCJP Some of my mobile work: http: //www. flickr. com/photos/89831807@N 02/show/

Unit 00: Setup

Unit 00: Setup

1/ Install required software: java-sdk 7, Android Studio, git, sourcetree 2/ Set-up steps (projects

1/ Install required software: java-sdk 7, Android Studio, git, sourcetree 2/ Set-up steps (projects and labs) 3/ A tour of the course website and policies: android. cs. uchicago. edu 4/ A tour of git-bash and Source. Tree a) add, reset, commit, F 5, folders b) amend c) branch d) push/remotes 5/ A tour of Android Studio (shortcuts, VCS, etc. )

http: //www. perforce. com/product/components/perforce-visual-merge-and-difftools

http: //www. perforce. com/product/components/perforce-visual-merge-and-difftools

Lab 2 g

Lab 2 g

Lab 2 g

Lab 2 g

Lab 2 g

Lab 2 g

Lab 2 m

Lab 2 m

bitbucket. org/jstudent/lab. Java Lab 2 m Your laptop

bitbucket. org/jstudent/lab. Java Lab 2 m Your laptop

Projects

Projects

Projects

Projects

Projects

Projects

Projects

Projects

Download and install required software: Java SDK (7): www. oracle. com/technetwork/javase/downloads/i ndex. html Android

Download and install required software: Java SDK (7): www. oracle. com/technetwork/javase/downloads/i ndex. html Android Studio: developer. android. com/sdk/installing/studio. html Git: git-scm. com Source. Tree: www. sourcetreeapp. com

GIT architecture

GIT architecture

git config --global user. name "Your Name" git config --global user. email "your_email@whatever. com"

git config --global user. name "Your Name" git config --global user. email "your_email@whatever. com"

add/reset/commit: move files from working-dir to stage-dir(aka index) git add res/. git add src/.

add/reset/commit: move files from working-dir to stage-dir(aka index) git add res/. git add src/. git add res/values/strings. xml move files from stage-dir(aka index) to working-dir git reset HEAD. git reset head res/. git reset head src/. git reset head res/values/strings. xml git commit -m “your commit message. ”

Amending: Every commit is associated with a sha-1 hash. That hash is derived from

Amending: Every commit is associated with a sha-1 hash. That hash is derived from 1/ the file changes in that commit and 2/ the previous commit. You can not change any commit unless that commit is at the head. Since no other commits depend on the head, you may safely change the head. To change the head, use git commit --amend -m “your message” git commit --amend --no-edit

Branching: To list the branches in a project: git branch -r git branch --all

Branching: To list the branches in a project: git branch -r git branch --all To create a branch: git checkout -b branch. Name c 39 b git checkout -b branch. Name To delete a branch: git branch -D branch. Name To checkout a branch: git checkout 7 afe git checkout master

Pushing to remotes: To see the remotes: git remote -v show To push to

Pushing to remotes: To see the remotes: git remote -v show To push to a remote: git push origin master git push --all To clear all local changes since last push git reset --hard origin/master

Reverting (does the exact opposite) git revert 0 da 8 --no-edit git revert head~3

Reverting (does the exact opposite) git revert 0 da 8 --no-edit git revert head~3 --no-edit To clear all local changes since last push git reset --hard origin/master To delete a remote branch git push origin : branch. Name

Android Studio Default keymap: http: //android. cs. uchicago. edu/content/slides/keymap. pdf File || settings ||

Android Studio Default keymap: http: //android. cs. uchicago. edu/content/slides/keymap. pdf File || settings || keymap

Unit 01: The Android Computing Platform

Unit 01: The Android Computing Platform

Android • Comprehensive open-source platform for mobile devices • Owned by Open Handset Alliance

Android • Comprehensive open-source platform for mobile devices • Owned by Open Handset Alliance http: //en. wikipedia. org/wiki/Open_Handset_Alliance • Championed by Google • Stated goal: "accelerate innovation in mobile and offer consumers a richer, less expensive, and better mobile experience. "

Vision for Android

Vision for Android

Android is NOT just phones Tablets Readers Televisions Game consoles AR-Devices Android Wear Android

Android is NOT just phones Tablets Readers Televisions Game consoles AR-Devices Android Wear Android is open-source, which means any manufacturer of mobile devices can drop

6/9/12

6/9/12

Android Version Distribution Using the compatability (support) libraries, you can develop in 4. 2

Android Version Distribution Using the compatability (support) libraries, you can develop in 4. 2 and min-build -target to 1. 6.

Android Version History http: //en. wikipedia. org/wiki/Android_version_history

Android Version History http: //en. wikipedia. org/wiki/Android_version_history

Code/Version/API map http: //source. android. com/source/build-numbers. html

Code/Version/API map http: //source. android. com/source/build-numbers. html

Mods (skins) HTC Motorola Samsung | HTC Motorola Samsung

Mods (skins) HTC Motorola Samsung | HTC Motorola Samsung

Open Handset Alliance The OHA was established on 5 November 2007, led by Google

Open Handset Alliance The OHA was established on 5 November 2007, led by Google with 34 members including mobile handset makers, application developers, some mobile carriers and chip makers. Android, the flagship software of the alliance, is based on an open source license and competes against mobile platforms from Apple, Microsoft, Nokia (Symbian), HP (formerly Palm), Research In Motion, and Samsung Electronics (bada). Headquarters: South Korea http: //en. wikipedia. org/wiki/Open_Handset_Alliance http: //en. wikipedia. org/wiki/Android_(operating_system)

i. OS versus Android Revenue at POP

i. OS versus Android Revenue at POP

Android Architecture

Android Architecture

6/9/12

6/9/12

Stock apps, all of which can be replaced; modular architecture. Managers (APIs to OS).

Stock apps, all of which can be replaced; modular architecture. Managers (APIs to OS). You will use these APIs in your apps. SQLite and Web. Kit are in i. OS as well. libc is from c. Open. GL is graphics, etc. kernel components; you won't touch these.

android dex files are like java class files - they're bytecode, but they've been

android dex files are like java class files - they're bytecode, but they've been optimized for a resource constrained environment.

Android is modular

Android is modular

Building Blocks of an App • Activities (you can see an activity, activities have

Building Blocks of an App • Activities (you can see an activity, activities have views. ) • Intents (shuttle messages) • Services (background services) • Content Providers (api abstraction to datastore) • Broadcast Receivers (capture OS broadcasts; such as battery-low, reboot, sms-received, headphone-plugged-in, etc. )

Some Developer Resources

Some Developer Resources

Resources Android Developer's Guide : developer. android. com/guide/index. html Stack Overflow: stackoverflow. com/questions/tagged/android Asset

Resources Android Developer's Guide : developer. android. com/guide/index. html Stack Overflow: stackoverflow. com/questions/tagged/android Asset Studio: android-uiutils. googlecode. com/hg/assetstudio/dist/index. html Android Views: www. androidviews. net