Lecture 2: Major Components of Android Apps Flashcards

1
Q

What are the 3 major categories that the content of an APK package can be split into?

A
  • Code: .dex files, .so files
  • Resources: images, fonts, resource list, etc
  • Other files: app manifest, metadata
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 4 classes of components of an android application?

A
  • Activities: UI and human-computer interfacing
  • Services: Background app processes
  • Broadcast Receivers: System notifications
  • Content Providers: Reading and writing data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Can a app only have a single activitity or multiple activities?

A

Multiple activities withi their own GUI layout, inputs, and outputs

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

True or false?
Activites owned by an app can only be called within that app

A

False

Activities owned by an app may be called from other applications as well

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

Besides handling UI layout and sharing of application functionality, Activities also server __?

A

Store user state

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

What is the purpose of the services component?

A

To handle the background functionality of applications

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

Services do not provide UI but allow __

A

code to be executed without interrupting other activities

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

What are the different priority levels for a service?

A

Services the user is aware of:
- Higher priority

Services the user isn’t aware of:
- Lower priority
- Can be put off

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

Like activites services may also be called by ___, this becomes known as a ___ service

A
  • other applications
  • bound service
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What do bound services allow android to do?

A

Ensure a service stays running as long as the calling app is also running

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

What is the purpose of the broadcast receiver?

A

To allow an application to receive data and ‘wake up’ without the need for a constantly running background service listener

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

What types of components work in the background and have no UI element or screen

A
  • Services
  • Broadcast Receivers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which component can generate system notifications or tell applications to generate system notifications?

A

Broadcast Receivers

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

What components is more preferable to use over a service and why?

A

Broadcast Receivers

They have less overhead in terms of resources used

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

What is the purpose of the content provider?

A

Handle programmatic data access by other applications.

Gives you a way to share data between apps in a controlled and secure manner

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

Content providers let you define ___ data is available and __ it is available

A
  • What
  • How
17
Q

What component offeres access to data in some underlying medium using a URI based system?

A

Content provider

18
Q

A content provider is not to manager your own app’s access to the data but instead to provide __

A

A managed API for all other apps to access your app data

19
Q

Any component of an app is callable by other applications however __

A

An application has control over what may be called by other apps

20
Q

Any component of an app is callable by other applications however __

A

An application has control over what may be called by other apps

21
Q

What is the purpose of the app manifest file?

A

Tells android:
- Which components make up an app
- Sharing permission of its components
- Overall hardware/software permissions required for the app

22
Q

What type of file is the app manifest and where is it stored?

A

XML file

The root of the app