Android Part 3 Flashcards

1
Q

Describe Activity Lifecycle

A

Activity Launched
Activity Running
Activity Killed
Acitivity Shut Down

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What happens when you press back?

A

it will call
onPause
onStop
onDestroy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Activity State Diagram

A

Running (Visible, foreground)
Paused (Visible)
Stopped (not Visible)
Non-Exsistent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a task?

A

A task is a collection of activities that users interact with when performing a certain job.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a stashed state?

A

activity instance dead, instance state saved.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is mvc?

A

Model View Controller

Is a software design pattern used in developing applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the model do?

A

Model is composed of objects that make up the data of the application.
user-defined classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the view do?

A

What the user sees and interacts with. look and feel.

Interacting with the text, passes info to a controller

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a controller?

A

go-between view and the model.
the view will respond to requests and dispatch them to controller.
controller contains logic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Some package benefits?

A

Group and locate classes
Avoid naming conflicts
Distribute software conveniently
Protect classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a context?

A

Interface to global information about an application environment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Some children of context?

A

Activity
Application
IntentService

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an intent?

A

A fundamental Android design principle

An abstract description of an operation to be performed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Types of intents?

A

Explicit - specific activity

Implicit - user pics app to handle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Some method of intents?

A

startActivityForResult
broadcastIntent- system-wide
startService-background service
bindService - communicate with background

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are primary pieces of info in an intent?

A

action - action to be performed

data - the data that the action will work on.

17
Q

Benefits of shared preferences?

A

Quick and easy method for storing simple information such as user preferences

18
Q

Some drawbacks of sp?

A

can only store limited data

cannot control where the data is stored

19
Q

Benefits of File I/O

A

Stores more data.

can manipulate store, any type of data.

20
Q

Drawbacks of File I/O

A

More coding involved

operations cant be performed on main UI thread

21
Q

Benefits of SQLite

A

More flexibility

takes care of locking issues

22
Q

Drawbacks of SQLite

A

More coding involved
Not on UI thread
Fedinite overkill for saving data

23
Q

What is a preference Activity?

A

The base class for an activity that will allow the user to view and set app preferences.

24
Q

What is a dialog?

A

A dialog is a pop-up that is displayed on top of the current activity. Pauses the activity

25
Q

Types of dialogs?

A

AlertDialog
DatePickerDialog
TimePickerDialog

26
Q

What is an alert dialog?

A

A dialog that can show a title, up to three buttons, a list of selectable items. Can have up to three buttons.