Terminology Flashcards

Learn to describe relevant android terminology (63 cards)

1
Q

What is the context in an Android application?

A

The command center of an Android application that allows access to all application-specific functionality.

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

What is an Activity in Android?

A

An application is a collection of tasks, and each task is an Activity that typically handles the display of a single screen.

An Activity extends the Context class.

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

What is a Fragment in Android?

A

A part of an Activity that may be reused in several Activities, often used to organize functionality for a more flexible user experience across various screen sizes.

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

What is an Intent in Android?

A

An asynchronous messaging mechanism used by the Android operating system, represented by an Intent object that holds the content of a message.

For example, it might convey a request for an activity to present an image to the user or let the user edit some text.

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

What are Broadcast Receivers in Android?

A

Components that listen for broadcast Intents that match a filter.

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

What are Content Providers/Notifications?

A

Content Providers allow applications to share data and send notifications to users.

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

What is a Service in Android terminology?

A

A Service performs tasks that do not require user interaction.

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

When are Services most useful?

A

Services are most useful for lengthy operations or tasks that need to be done regularly.

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

What is an example of a task suitable for a Service?

A

Checking for new mail is an example of a task suitable for a Service.

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

What is the Application Context used for?

A

It is used to access settings and resources shared across multiple Activity instances.

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

How do you retrieve the Application Context?

A

Use the method: Context context = getApplicationContext();

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

How are Application Resources identified?

A

Resources have a unique identifier, which is a number automatically generated within the R.java class.

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

How do you retrieve a string resource in the Application?

A

Use the method: String greeting = getResources().getString(R.string.hello);

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

What method is used to access Application Preferences?

A

Use the method getSharedPreferences().

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

What is the purpose of the SharedPreferences class?

A

It can be used to save simple application data such as configuration settings.

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

How do you access Application Files and Directories?

A

This will be covered later.

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

How do you retrieve Application Assets?

A

Use the getAssets() method.

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

What does the getAssets() method return?

A

It returns an AssetsManager instance that can be used to open a specific asset by name.

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

What is core to any Android application?

A

android.app.Activity

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

What should you define and implement for each screen in an application?

A

An Activity

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

What are some examples of screens in a simple game application?

A

A Startup or Splash screen, A Main Menu screen, A Game Play screen, A High Scores screen, A Help/About screen

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

What class is often used for Activities to access new APIs on older API versions?

A

androidx.appcompat.app.AppCompatActivity

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

What allows Android applications to be multi-process?

A

The Android operating system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What can happen to applications during events like a phone call?
They can be interrupted and paused
26
How many active applications are visible to the user at a time?
Only one active application is visible
27
What does the operating system use to keep track of all Activities?
An Activity stack
28
What happens when a new Activity starts?
The Activity on top pauses and the new one is pushed onto the top of the stack
29
What occurs when an Activity finishes?
That activity is removed from the top and the previous resumes
30
What is called when an Android Activity starts?
onCreate(Bundle) ## Footnote First time it is null. If it has been killed for memory reasons, it contains previous state info. Must be explicitly saved using onSaveInstanceState(Bundle)! Perform setup such as layout and data binding. Calls setContentView() for example setContentView(R.layout.main);
31
What is the purpose of onResume() in an Android Activity?
Called when the Activity reaches the top of the Activity stack and becomes the foreground process. ## Footnote Appropriate place to start audio, video, and animations.
32
What happens in onPause() in an Android Activity?
Called when another Activity moves to the top of the activity stack. ## Footnote Right place to stop audio, video, and animation started in onResume(). Deactivate resources such as database Cursors objects. Save uncommitted data (in case application does not resume). Should be quick because the foreground Activity is not started until onPause() returns.
33
What happens to Activity objects under low-memory conditions?
The Android operating system can kill the process for any Activity that is paused, stopped, or destroyed.
34
What occurs if an Activity is killed after onPause()?
The onStop() and onDestroy() methods might not be called.
35
What happens to the Activity state when it is killed?
The state is saved in a Bundle object, which is used by onCreate when the user returns to the Activity.
36
What is the purpose of onSaveInstanceState()?
It saves the state in a Bundle object, but it is not guaranteed to be called.
37
When should essential data be saved?
Essential data should be saved using onPause().
38
What does onRestoreInstanceState() do?
It is called after onStart() to restore the saved state.
39
What are the two reasons onDestroy() is called?
1. The Activity has completed its lifecycle voluntarily. 2. The Activity is killed by Android.
40
What does the isFinishing() method return if the Activity is killed by Android?
The isFinishing() method returns false.
41
What is the manifest file?
A configuration file written in XML, always named AndroidManifest.xml for all applications.
42
What is the purpose of the manifest file?
It is used by the Android system to install and upgrade the application package, determine app settings, specify system requirements, declare components, and identify permissions.
43
Where is the manifest file located in Android Studio?
The manifest file is located at app/manifests in Android Studio IDE’s 'Android' perspective and app/src/main in the filesystem.
44
What does the manifest tag contain?
Package-wide settings including package name, version information, supported Android SDK, and hardware or feature requirements.
45
What does the application tag contain?
Application-wide settings including label, icon, and information about app components like activities and services.
46
What are the versioning attributes in the manifest?
android:versionCode for managing upgrades and android:versionName displayed to users.
47
What is the uses-permission tag?
It contains any permission rules required by the application.
48
What is the uses-feature tag?
It specifies any features (hardware) required for the app.
49
What system requirements can be specified in the manifest file?
Requirements such as GPS, camera, Bluetooth, Android SDK version, and hardware configurations.
50
What attributes can be set in the tag?
Attributes include minSdkVersion, targetSdkVersion, and maxSdkVersion.
51
How does Android handle different input methods?
By specifying supported input methods like hardware keyboard, directional pad, and touch screen.
52
What is the tag used for?
It specifies which Android features the app requires, but the Android OS does not enforce them.
53
How does Android categorize screen sizes?
By size (small, normal, large, xlarge) and density (LPDI, MDPI, HDPI, etc.).
54
How are external libraries registered in the manifest?
By using the tag within the tag.
55
What components can be registered in an Android app?
Components include Activity, Service, Broadcast Receiver, and Content Provider.
56
How is the primary entry point activity defined?
By using an intent filter in the tag with action MAIN and category LAUNCHER.
57
What information does an Intent object contain?
It contains component name, action, data, category, extras, and flags.
58
What are explicit and implicit intents?
Explicit intents designate the target component by name, while implicit intents do not.
59
How does Android resolve implicit intents?
The system finds the best component to handle the intent by comparing the Intent object to intent filters.
60
What are intent filters?
They define the capabilities of a component and are usually set up in the AndroidManifest.xml.
61
What is the purpose of the and tags?
They are used to register Services and Broadcast Receivers, respectively.
62
What is a Content Provider?
An app that exposes data for other apps using the tag.
63
What other settings can be configured in the manifest file?
Application-wide themes, unit-testing features, intent filters, and broadcast receivers.