Open main menu

CDOT Wiki β

Changes

MAP524/DPS924 Lecture 3

702 bytes added, 11:53, 12 July 2015
no edit summary
This week we're looking at the primary components used for building an Android app. We're finally starting to write code. But first we'll need an overview of:
* '''Application Manifest''': XML based file that the application outlines the activities, services, broadcast receivers, data providers and permissions that make up the complete application. Used to also hold some information that's now in build.gradle.
* '''Activity''': [[#Activity|see below]].
* '''Intent''': a messaging object you can use to request an action from another app component. One of the primary ways to do IPC on Android. See overview on [http://developer.android.com/guide/components/intents-filters.html Android developers].
* '''Broadcast Receiver''': Enable applications to receive intents that are broadcast by the system or by other applications. See ths [http://www.vogella.com/tutorials/AndroidBroadcastReceiver/article.html BroadcastReceiver tutorial].
* '''Service''': an application component representing either an application's desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use. We'll also look at them more closely after the break.
* '''Event handling''': See this nice [http://www.tutorialspoint.com/android/android_event_handling.htm Android Event Handling tutorial]
** Event Listener: a class specialized that contains a single callback method.
** Event Handler: the actual method that handles the event.
** Easiest way (if available) is to register the event handler via the layout xml file.
 Adapter an object that acts as a bridge between an AdapterView and the underlying data for that view. The Adapter provides access to the data items.* '''Layout''': [[#Layout defines the visual structure for a user interface|see below]]* Fragment : created using an XML layout file that looks like a sub-layout and behaves like a sub-activity. We'll look at fragments next week.* '''Content Provider manages ''': One way for an application to provide access to data it holds. It's one form of IPC usually used for more standard types of data. See a central repository list of tutorials at the [http://developer.android.com/guide/topics/providers/content-providers.html bottom of datathis page]. We'll also look at them more closely after the break.* '''Menu ''': Used to be a visual component critical part of any android application until the menu button's been removed from Android tablets and later phones. Now is still used to provide actions or options to an activitybut isn't as prevalent.* '''Resource ''': an additional file and static content that your code uses, such as bitmaps, layout definitions, user interface strings, animation instructions, and more.* '''Notification ''': a news channel that alerts the user to important events as they happen or a log that chronicles events while the user is not paying attention. See the [http://developer.android.com/guide/topics/ui/notifiers/notifications.html developer guide].Preference application or user specific setting* '''Settings and Shared Preferences''': display ([http://developer.android.com/guide/topics/ui/settings.html Settings]) and store ([http://developer.android.com/guide/topics/ui/settingsApplication Manifest XML based file that the application outlines the activitieshtml Shared Preferences]) simple configuration data (strings, services, broadcast receivers, data providers and permissions that make up the complete numbers) for your application.Application Context consists of a * '''R.java''': A dynamically-generated class named R containing references to resources and the manifest file.
== Activity ==