2. WHO AM I?
Working as a consultant in Android Development @ Tikal
Knowledge.
Extensive work in mobile HTML5-hybrid applications
Worked for leading mobile security companies on Android/Mobile
applications.
Contact: michael@tikalk.com
8. Prerequisite Knowledge
• Java Development (basic understanding of
dev environments and UI component
implementations)
Prerequisite Installs
• Eclipse
• ADT plugin for Eclipse
• Android SDK with at least version 4.3
13. Android at a Glance
Google’s Development References and Tools
Package References
Development Tools
Building Your First App
Developer Blog
Sample Apps (download through SDK
manager)
14. Android at a Glance
Hello World example
(also covering Project
structure/creation/debuging/DDMS/Manifest)
15. Android UI via XML
Utilization
• UI can be designed for one or many screens using XML parameters
and graphical previews using Android Developer Toolkit WYSIWYG
editor.
• XMLs are then loaded dynamically in Java components and can be
accessed/manipulated on the Java level.
Usefulness
• Offers similar development to HTML and JavaScript paradigm
• Easily generate UI assets in WYSIWYG
• Naming conventions allow to design XML for specific screen
sizes, orientations, Android SDK versions, languages
text
17. Android UI via XML
XML layout example (from Hello World)
18. Activities and Fragments
Activities
• An “application component that provides a screen with which users
can interact in order to do something, such as dial the phone, take
a photo, send an email, or view a map.” - Activities
• Usually tied to an xml layout that constitutes its ContentView
Fragments
• Only added in Android 3.0.xx in order to deal with tablets, but now
available with backwards compatibility using Support Library
• Different concept from Activities, now need to think about aspects of
each screen and not just the screen themselves in order to offer
responsive design for multiple screens
text
21. Intents
Description
• “An intent is an abstract description of an operation to be
performed.” – Intent Reference
• Intents offer a runtime binding between Activities and Applications
allowing them to be added to the different process stacks.
Example (Explicit Intent, activities need to be added to
manifest)
Intent intent = new Intent(this, DisplayMessageActivity.class);
intent.putExtra(EXTRA_ACTION, “warning”);
this.startActivity(intent);
text
23. Views
“This class represents the basic building block for user
interface components. A View occupies a rectangular
area on the screen and is responsible for drawing and
event handling. View is the base class for
widgets, which are used to create interactive UI
components (buttons, text fields, etc.). The ViewGroup
subclass is the base class for layouts, which are
invisible containers that hold other Views (or other
ViewGroups) and define their layout properties.”
text
24. Commonly Used Views
Definitions from developer.android.com
• TextView - Displays text to the user and optionally allows them to
edit it. A TextView is a complete text editor, however the basic class
is configured to not allow editing…
• EditText - EditText is a thin veneer over TextView that configures
itself to be editable.
• Button - Represents a push-button widget. Push-buttons can be
pressed, or clicked, by the user to perform an action.
• ImageView - Displays an arbitrary image, such as an icon. The
ImageView class can load images from various sources (such as
resources or content providers), takes care of computing its
measurement from the image so that it can be used in any layout
manager, and provides various display options such as scaling and
tinting.
text
25. Commonly Used Views
(continued)
Definitions from developer.android.com
• ProgressBar - Visual indicator of progress in some operation…
• CheckBox - A checkbox is a specific type of two-states button that
can be either checked or unchecked.
• RadioButton - A radio button is a two-states button that can be
either checked or unchecked…contrary to a CheckBox, a radio
button cannot be unchecked by the user once checked.
• WebView - A View that displays web pages. This class is the basis
upon which you can roll your own web browser or simply display
some online content within your Activity. It uses the WebKit
rendering engine to display web pages and includes methods to
navigate forward and backward through a history, zoom in and
out, perform text searches and more.
text
27. ListViews and Adapters
ListView is a view group that displays a list of scrollable
items. The list items are automatically inserted to the list
using an Adapter that pulls content from a source such
as an array or database query and converts each item
result into a view that's placed into the list.
text
29. Dialogs
A dialog is a small window that prompts the user to
make a decision or enter additional information. A dialog
does not fill the screen and is normally used for modal
events that require users to take an action before they
can proceed.
text
30. Toasts
A toast provides simple feedback about an operation in
a small popup. It only fills the amount of space required
for the message and the current activity remains visible
and interactive. For example, navigating away from an
email before you send it triggers a "Draft saved" toast to
let you know that you can continue editing later. Toasts
automatically disappear after a timeout.
text
32. Support Library
The Android Support Library package is a set of code
libraries that provide backward-compatible versions of
Android framework APIs as well as features that are
only available through the library APIs.
text
Including features like:
• Fragments
• ViewPager
• DrawerLayout
• ActionBar
• Many more
34. Google Play Services and
Google Play Game Services
Google Play services gives you the freedom to use the newest APIs for
popular Google services without worrying about device support. Updates to
Google Play services are distributed automatically by the Google Play Store
and new versions of the client library are delivered through the Android SDK
Manager. This makes it easy for you to focus on what's important: your users'
experience.
Include Services like:
• Geofencing
• Google Wallet
• Game Leader Boards
• Cloud Data
• Much Much More
text