Download presentation
Presentation is loading. Please wait.
Published byJanice Jefferson Modified over 7 years ago
1
Android Application Development gerber.cs.uchicago.edu/android/
setup notes: use Android Screen Monitor asm.jar Ctl-5 or Cntl-7 to change size. To show student the device. Long-press buttons to see them.
2
Adam Gerber, PhD, SCJP Introductions: Name Where are you from?
Some of my mobile work: MythicMobile.com Introductions: Name Where are you from? Your experience with mobile and java? What you want to get out of this class?
3
Android Comprehensive open-source platform for mobile devices
Owned by Open Handset Alliance Championed by Google Stated goal: "accelerate innovation in mobile and offer consumers a richer, less expensive, and better mobile experience." Chrome OS and Android merge.
4
Vision for Android Hardware divergence or fragmentation, but it seems be holding together.
5
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 Android onto it. videos of AR etc applications.
6
videos on glass and others here. Google Glass + spoof
6/9/12
7
Android Version Distribution
Using the compatability (support) libraries, you can develop in 4.2 and min-build-target to 1.6.
8
Code/Version/API map code names mapped to APIs
9
Mods (skins) HTC Motorola Samsung | HTC Motorola Samsung
HTC: has almost as many developers in Taiwan working on SenseUI as the Android team. Very sophisticated consumer device. Held up by Apple by injunction. .
10
Open Handset Alliance Headquarters: South Korea
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
11
Google has announced that there are now 700,000 apps available for Android. This means that for the first time, the number of apps available for Android customers matches those for iOS, according to Bloomberg. They're both around 700k available apps currently, and Google play is projected to make it to the 1m mark before Apple. These are global sales.
12
Google has announced that there are now 700,000 apps available for Android. This means that for the first time, the number of apps available for Android customers matches those for iOS, according to Bloomberg. They're both around 700k available apps currently, and Google play is projected to make it to the 1m mark before Apple. These are global sales.
13
Google has announced that there are now 700,000 apps available for Android. This means that for the first time, the number of apps available for Android customers matches those for iOS, according to Bloomberg. They're both around 700k available apps currently, and Google play is projected to make it to the 1m mark before Apple. These are global sales.
14
Apple has been strong in anglo-saxon markets. US Market.
16
Google has announced that there are now 700,000 apps available for Android. This means that for the first time, the number of apps available for Android customers matches those for iOS, according to Bloomberg. They're both around 700k available apps currently, and Google play is projected to make it to the 1m mark before Apple. These are global sales.
17
Intel losing market share to tablets and phones
18
Android Support three different processors: ARM, Intel, and MIPS.
The Intel or x86 chips are fast but they’re power hungry. They’re used on laptops. (Complex Instruction Set Computing or CISC) The MIPS are used in embedded systems. The ARM are RISC or (Reduced Instruction Set Computing). Much less power hungry chips.
19
The market for mobile software is exploding
The market for mobile software is exploding. Not just consumer; any company that has agents distributed in the field will benefit from this. You think of consumers playing games, but many applications are field-force automation. Developers make money B2B. Consider medical professionals like medical doctors which move from hospital bed to hospital bed. Sales people typically qualify you when you walk into a car showroom.
21
iOS versus Android Revenue at POP
The slide the google doesn't want you to see.
22
Android Architecture
23
6/9/12
24
Stock apps, all of which can be replaced; modular architecture.
Managers (APIs to OS). You will use these APIs in your apps. SQLite and WebKit are in iOS as well. libc is from c. OpenGL is graphics, etc. Software Stack: Linux Kernel - not another flavor of linux like cent-os. Well known driver model Linux security is excellent - and Android entrusts it's security to linux many open-source projects, including sqlLite, which is a very small relational database webkit, which is what iOS also uses for webviews, including it's client, which is just a webkit webview. surface manager is for rendering graphics, FreeType is likely royalty free type-fonts, Dalvik VM - compiles to java byte-code, then to dalvik byte-code, which is even tighter than java byte-code. (oracle lost it's case against google, which is good). each application is running in seperate Dalvik VM instance. The apps communicate using something called intents intra-app and inter-app both. Core libs including Activity and Bundle and Intent Package manager like in Linux, manages the applications (called packages in linux) on your device. Telelphony is phone, location is GPS, Content providers are data stores. Built-in Applications that come with the operating system. kernel components; you won't touch these.
25
Java byte code versus Dalvik byte code
Java byte code versus Dalvik byte code. The byte code is even tighter and is optimized for Mobile. android dex files are like java class files - they're bytecode, but they've been optimized for a resource constrained environment.
26
Android is modular Android architecture is extremely modular and open. If you don't like your mail-reader, you can get a 3rd party one. If you don't like your text-client, you can get a 3rd party one, or you can make your own. Extreme decoupling.
28
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. )
29
Some Developer Resources
31
Resources Android Developer's Guide : developer.android.com/guide/index.html Stack Overflow: stackoverflow.com/questions/tagged/android Asset Studio: android-ui- utils.googlecode.com/hg/asset- studio/dist/index.html Android Views:
32
Android Layouts explained
Android Layouts explained The Layout file is nothing more than XML with some Android namespaces: xmlns:android declaring-layout.html Search for TextView or EditText or Button
33
Views versus ViewGroups
Views versus ViewGroups All Views and ViewGroups are Views. View is the Grand-daddy of all Views in Android which itself is just a Java Object. ViewGroups collect Views and other Viewgroups. You can nest ViewGroups. Typical ViewGroups: LinearLayout, RelativeLayout, FrameLayout.
34
ViewGroups All Views and ViewGroups are Views. View is the Grand-daddy of all Views in Android which itself is just a Java Object. ViewGroups collect Views and other Viewgroups. You can nest ViewGroups. Typical ViewGroups: LinearLayout, RelativeLayout, FrameLayout.
35
Attributes (match_parent and fill_parent same since API8)
Attributes (match_parent and fill_parent same since API8) :match_parent / fill_parent :wrap_content
36
Attributes :layout_gravity :gravity
Attributes :layout_gravity :gravity :layout_gravity descibes how the view is layed- out inside its parent. (outside) :gravity describes how the view lays out its elements or children (inside) avity-and-layout-gravity-on-android
37
Attributes :margin :padding :margin is the outside “margin”
Attributes :margin :padding :margin is the outside “margin” :padding is the inside “margin”
38
LinearLayout :orientation is horizontal or vertical
LinearLayout :orientation is horizontal or vertical :weightSum is typically 100 (percent) :gravity – where should the content be placed
39
Projects
40
Projects
41
Projects
42
Download and install required software:
Java SDK (7): Android Studio: developer.android.com/sdk/installing/studio.html Git: git-scm.com SourceTree:
43
GIT architecture
44
git config --global user.name "Your Name"
git config --global user.
45
add/reset/commit: move files from working-dir to stage-dir(aka index) git add . 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.”
46
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
47
Branching: To list the branches in a project: git branch git branch -r git branch --all To create a branch: git checkout -b branchName c39b git checkout -b branchName To delete a branch: git branch -D branchName To checkout a branch: git checkout 7afe git checkout master
48
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
49
Reverting (does the exact opposite)
git revert 0da8 --no-edit git revert head --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 :branchName
50
Unit00: Setup
51
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: 4/ A tour of git-bash and SourceTree a) add, reset, commit, F5, folders b) amend c) branch d) push/remotes 5/ A tour of Android Studio (shortcuts, VCS, etc.)
52
Lab 2g
53
Lab 2g
54
Lab 2g
55
Lab 2m
56
bitbucket.org/jstudent/labJava
Lab 2m Your laptop
57
Projects
58
File || settings || keymap
Android Studio Default keymap: File || settings || keymap
59
Unit01: The Android Computing Platform
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.