Module 1 and 3 Flashcards
The mobile operating system is based on _______.
Linux
What was the company that originally developed Android?
Android.inc
When was Android purchased by Google?
2005
What are the different Android Features?
- Database
- Media Files
- WiFi
- Messaging
- Applications
- Touch Screen
It is a software stack of components for a mobile device.
Android Architecture
The _________ contains a Linux Kernel, collection of C/C++ libraries exposed through an application framework services, runtime and application.
Android Software Stack
What are the different parts of the Android Architecture?
In order:
1. Applications
2. Android Framework
3. Android Runtime
4. Platform Libraries
5. Linux Kernel
It is the main component to provide OS functions to mobile.
Linux Kernel
True or False.
Dalvik Virtual Machine (DVM) is for emulating mobile applications.
False.
(DVM is for RUNNING mobile applications.)
These are the essential building blocks of an Android application.
Application Components
True or False.
Application components are loosely coupled by the application manifest file, MainActivity.java.
False.
(the main application file, AndroidManifest.xml)
This file describes each component and how they interact.
AndroidManifest.xml
These dictate UI and user interaction to the phone screen.
Activities
These handle background processing associated with an application.
Services
These handle communication between Android OS and applications.
Broadcast Receivers
These handle data and database management issues.
Content Providers
These are portions of user interface in an activity.
Fragments
These are UI elements drawn on-screen.
Views
These are view hierarchies that control format and appearance of views.
Layouts
These are messages wiring components together.
Intents
These refer to external elements.
Resources
This represents a single screen with a user interface and performs actions on the screen.
Activities
True or False.
If an application has more than one activity, one should be marked as the activity that is presented when the application is launched.
True
An activity is a subclass of ________ class.
Activity
Syntax:
public class ActName extends Activity{}
It is a component that runs in the background to perform long-running operations.
Services
Syntax:
public class ServiceName extends Service{}
A service is a subclass of _________ class.
Service
True or False.
Applications or the system cannot initiate broadcasts messages to let other applications know that some data has been downloaded and is available to
use.
False.
(Applications and the system CAN initiate broadcast messages)
The ______________ will intercept communication and initiate appropriate action.
Broadcast Receiver
A broadcast receiver is a subclass of ____________ class and each message is broadcasted as an ______ object.
BroadcastReceiver; Intent
Syntax:
public class ReceiverName extends BroadcastReceiver{public void onReceive(context,intent){}}
This allows apps to supply data to others on request.
Content Providers
True or False.
Requests are handled by ContentResolver class methods. The data may be stored in the
file system, database or somewhere
else.
True
A content provider is a subclass of ________ class and must implement a standard set of APIs for transactions
ContentProvider
Syntax:
ContProvName extends ContentProvider{public void onCreate(){}}
This refers to the additional files and static content
under res/.
Android Resources
Android resources are accessed using the command, ________.
R.dirName.resourceID
This resource directory contains XML files that define Property animations.
animator/
R.animator
This resource directory contains XML files that define Tween animations.
anim/
R.anim
True or False.
Property animations can also be saved in anim/ but animator/ is preferred to distinguish between the two.
True.
This resource directory contains XML files that define a state list of colors.
color/
R.color
This resource directory contains Bitmap (PNG, JPG, or GIF) or XML files compiled into different subtypes.
drawable/
R.drawable
This resource directory contains XML files that define a user interface layout.
layout/
R.layout
This resource directory contains XML files that define application menus (Options, Context, or Sub Menu)
menu/
R.menu
This resource directory contains arbitrary files to save in their raw form.
raw/
True or False.
Regarding the raw/ directory, to open with a raw InputStream call, call Resource.openResource() with the resource ID, R.raw.filename
False.
(Resource.openRawResources must be called)
To access original filenames and file hierarchy, save resources in ______.
assets/
True or False.
Files in assets/ have a resource ID so you can only read them using AssetManager.
False.
(files in assets/ DON’T have a resource ID)
This resource directory contains XML files that contain simple values and can describe multiple resources.
values/
This resource directory contains Arbitrary XML files read at runtime by calling Resources.getXML().
xml/
Various XML configuration files must be saved
here in this resource directory.
xml/
This resource directory contains Font files (TTF, OTF, or TTC), or XML files with a <fontfamily> element.</fontfamily>
font/
True or False.
When your application is compiled, a R class gets generated with resource IDs for all resources in res/.
True
True or False.
You can use R class to access that resource with sub-directory and resource name (R.dir.ID) or directly
resource ID (R.id).
True
What is the syntax for accessing resources in XML file?
“@element/resourceID”
@string/hello