Basic Components of an Android Application Flashcards

1
Q

List the fields set when creating a new Android Application

A

– The project’s name
– The package’s name
– The project folder’s location
– Language of use (either Java or Kotlin)
– The minimum SDK version

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

What is the importance of a minimum SDK version

A

It will determine the number of devices the application will be deployed on and also the minimum version for that an application can be deployed on)

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

What files are under the Apps folder

A

– MainActivity
– Layout files
– AndroidManifest.xml
– Gradle Scripts

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

Describe the Main Activity and where it is found

A

● This is the entry point of any given application.
● It is found under the main package name assigned during project creation, which in turn
sits in the java subfolder

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

Where are other activities created

A

– Other activities are usually created under the same level as the MainActivity.
– Depending on a project’s structure, different activities can fall under different packages, which fall under the java subfolder.

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

How are Layouts defined in mobile dev. What is the initial layout?

A

● The layout subfolder, which falls under the res subfolder, contains XML files that define the various activities’ UIs.
● By default, the initial layout created is the activity_main.xml which defines the layout of the main activity.

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

Describe the AndroidManifest.xml file and its importance

A

● This sits under the manifests subfolder.
● By default, when using Android Studio, this file is
automatically generated, and is always named as AndroidManifest.xml.
● It is an important Android file that describes the fundamental
characteristics of an app and defines each of the app’s
components, providing this info to Android build tools, OS, and Google Play.
● Any component in the application must be declared in the AndroidManifest.xml file, failure to which it will not be started by the application.

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

What are the key elements declared in the AndroidManifest.xml and in which format are they declared

A

– App components: Activities, services, broadcast receivers, and content providers
– App permissions
– Hardware and software features the app requires

● Due to it’s format as a markup language, the elements in an AndroidManifest.xml must be
declared as (enclosed in) tags.

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

What are the App components that are declared in the manifest

A

– <activity> for each subclass of Activity.
– <service> for each subclass of Service.
– <receiver> for each subclass of BroadcastReceiver.
– <provider> for each subclass of ContentProvider.</provider></receiver></service></activity>

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

What are attributes in components and give examples

A

Within each component, the relevant characteristics
must be declared under various attributes.

Examples:
-The name attribute is used to identify a component.
-Intent filters
-Icons and labels

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

Describe Intent filters and define an intent

A

– App components are activated by intents.
– An intent is a message defined by an Intent object that describes an action to perform, including the data to be
acted upon, the category of component that should
perform the action, and any other instructions.
– An app component can have a number of intent filters
declared.

*See slide 13

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

Describe Icons and labels:

A

– When declared within elements, these display small
icons and labels for users in the corresponding app components

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

Why do android apps need maps

A

Android apps must request permissions to access
sensitive user data, eg, contacts, location, SMS, other apps, etc.

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

How are permissions defined and handled in android development

A

Each permission is identified by a unique label representing the specific request.
● Each permission is placed inside a <usespermission> tag.
● Any new user-defined permission for an app must
be declared using the <permission> tag.</permission></usespermission>

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

What are the tags used to declare H//W and S/W features in the manifest. What is the importance of this declaration

A

● Key tags for this include:
– <uses­feature>: declares h/w and s/w features and app needs
– <uses­sdk>: declares minimum version an app will be compatible with.

This ensures that only compatible devices are able to install and run the applications.

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