Android Part 3 Flashcards
Describe Activity Lifecycle
Activity Launched
Activity Running
Activity Killed
Acitivity Shut Down
What happens when you press back?
it will call
onPause
onStop
onDestroy
Activity State Diagram
Running (Visible, foreground)
Paused (Visible)
Stopped (not Visible)
Non-Exsistent
What is a task?
A task is a collection of activities that users interact with when performing a certain job.
What is a stashed state?
activity instance dead, instance state saved.
What is mvc?
Model View Controller
Is a software design pattern used in developing applications
What does the model do?
Model is composed of objects that make up the data of the application.
user-defined classes
What does the view do?
What the user sees and interacts with. look and feel.
Interacting with the text, passes info to a controller
What is a controller?
go-between view and the model.
the view will respond to requests and dispatch them to controller.
controller contains logic
Some package benefits?
Group and locate classes
Avoid naming conflicts
Distribute software conveniently
Protect classes
What is a context?
Interface to global information about an application environment.
Some children of context?
Activity
Application
IntentService
What is an intent?
A fundamental Android design principle
An abstract description of an operation to be performed
Types of intents?
Explicit - specific activity
Implicit - user pics app to handle
Some method of intents?
startActivityForResult
broadcastIntent- system-wide
startService-background service
bindService - communicate with background
What are primary pieces of info in an intent?
action - action to be performed
data - the data that the action will work on.
Benefits of shared preferences?
Quick and easy method for storing simple information such as user preferences
Some drawbacks of sp?
can only store limited data
cannot control where the data is stored
Benefits of File I/O
Stores more data.
can manipulate store, any type of data.
Drawbacks of File I/O
More coding involved
operations cant be performed on main UI thread
Benefits of SQLite
More flexibility
takes care of locking issues
Drawbacks of SQLite
More coding involved
Not on UI thread
Fedinite overkill for saving data
What is a preference Activity?
The base class for an activity that will allow the user to view and set app preferences.
What is a dialog?
A dialog is a pop-up that is displayed on top of the current activity. Pauses the activity