4. Future of Android
• Android is a mobile phone operating system powered by
Google
• Nearly every device in your house, from your television to
your refrigerator, is going to be networked and could very well
be Android-powered”, says Google Chairman Eric Schmidt
• Android had a worldwide smart-phone market share of 75%
by the third quarter of 2012, with 500 million devices
activated in total and 1.3 million activations per day
TSCS (The School of Creative Sciences)
5. MAKING AN APP ON ANDROID
TSCS (The School of Creative Sciences)
6. 1. Mobile Application Development (MAD)
2. Intro to Android platform
3. Platform architecture
4. Application Framework & API
5. Application building blocks
6. Development tools
7. Hello Android
8. Porting application to Mobile
SCOPE OF THIS PPT
TSCS (The School of Creative Sciences)
7. Computer
Fax
Radio
Email
Music player
Word processor Credit cards 7
FEW REASONS TO GO MAD
TSCS (The School of Creative Sciences)
8. Email
Computer
Fax
Word processor
Music player
Credit cards
Radio
LET YOUR SMARTPHONE TAKE CARE
OF ALL THIS MADNESS
TSCS (The School of Creative Sciences)
9. What is Android
Open software platform for mobile development
A complete stack – OS, Middleware, Applications
An Open Handset Alliance (OHA) project
Powered by Linux operating system
Fast application development in Java
Open source under the Apache 2 license
TSCS (The School of Creative Sciences)
12. Application Building Blocks
Activity
IntentReceiver
Service
ContentProvider
TSCS (The School of Creative Sciences)
13. Activities
Typically correspond to one UI screen
But, they can:
Be faceless
Be in a floating window
Return a value
Activity refers to (J)Frame in Swing
TSCS (The School of Creative Sciences)
14. Intents
Think of Intents as a verb and object; a description of what
you want done
E.g. VIEW, CALL, PLAY etc.
System matches Intent with Activity that can best provide the
service
Activities and IntentReceivers describe what Intents they can
service
TSCS (The School of Creative Sciences)
15. Intent Receivers
Components that respond to broadcast ‘Intents’
Way to respond to external notification or alarms
Apps can invent and broadcast their own Intent
TSCS (The School of Creative Sciences)
16. Services
Faceless components that run in the background
E.g. music player, network download etc…
TSCS (The School of Creative Sciences)
17. Content Providers
Enables sharing of data across applications
E.g. address book, photo gallery
Provides uniform APIs for:
querying
delete, update and insert.
Content is represented by URI and MIME type
TSCS (The School of Creative Sciences)
18. DIFFERENT LAYOUTS HIERARCHY OF SCREEN ELEMENTS
Linear Layout
Absolute Layout
Table Layout
ANDROID USER INTERFACES
TSCS (The School of Creative Sciences)
19. Activities in Android refers almost to a (J)Frame in Swing
Views in Android refers to (J)Components in Swing
TextViews in Android refers to a (J)Labels in Swing
EditTexts in Android refers to a (J)TextFields in Swing
Buttons in Android refers to a (J)Buttons in Swing
COMPARING ANDROID UI ELEMENTS TO SWING
UI ELEMENTS
TSCS (The School of Creative Sciences)
20. <application>
Root element containing declarations of the application-level components contained in the
package. This element can also include global and/or default attributes for the application,
such as a label, icon,theme, required permission, etc.Quantity: 0 or 1.
<activity>
An Activity is the primary thing for an application to interact with the user. The initial screen the
user sees when launching an application is an activity, and most other screens they use will be
implemented as separate activities declared with additional activity tags.
<intent-filter>
Declares what kind of Intents a component supports. In addition to the various kinds of
values that can be specified under this element, attributes can be given here to supply a
unique label, icon, and other information for the action being described.
TSCS (The School of Creative Sciences)
21. <action>
An action-type that the component supports. Example:
<category>
A category-type that the component supports. Example:
Some other Tags Available……
<meta-data>
<receiver>
<service>
<provider>
TSCS (The School of Creative Sciences)
22. Download and Install the
Android SDK and Test the
Emulator
Installing JDK and JRE(1.5 or
above)
Install Eclipse
Install ADT plugin for Eclipse
APPLICATION DEVELOPMENT STEPS
TSCS (The School of Creative Sciences)
23. New > Project…
Select Android project in wizard menu
APPLICATION DEVELOPMENT CNTD.
TSCS (The School of Creative Sciences)
26. AndroidManifest.xml>>
APPLICATION DEVELOPMENT CNTD.
TSCS (The School of Creative Sciences)
27. >>Running Your First Application
APPLICATION DEVELOPMENT CNTD.
TSCS (The School of Creative Sciences)
28. Output in the emulator
APPLICATION DEVELOPMENT CNTD.
TSCS (The School of Creative Sciences)
29. UIs using Java way
APPLICATION DEVELOPMENT CNTD.
TSCS (The School of Creative Sciences)
30. Porting Applications to Mobile
Resource files are bundled to .apk file archive
Bundled by aapt tool
One .apk file archive is a Single application
TSCS (The School of Creative Sciences)
31. Interesting things to do
Android is open source
Opportunities for researchers
Get the source, compile and update the device image
TSCS (The School of Creative Sciences)
32. http://developer.android.com
http://code.google.com/android
http://anddev.org
REFERENCES
TSCS (The School of Creative Sciences)