Mobile Software Engineering I - Unit 4 Flashcards
(26 cards)
What are the main components that compose the logical structure of an Android application?
- activities
- services
- intents
- broadcast receivers
- content providers
- resources
What does an activitiy in an Android application represent?
A single screen in the UI.
What stages exist in Android activities?
- start
- pause
- stop
What different types of services exist in Android?
-
started: runs in the foreground, and does not stop until a call to
stopService()
is made - bound: runs in the background and only as long as something is bound to them
What is the purpose of a Broadcast receiver in Android?
To handle communications between the Android system and different applications.
What is the concept of a Content Provider in Android?
It is used to access data while hiding the underlying storage medium/format.
What are Intents in Android?
Asynchronous messages for communication between Android components.
What does the AndroidManifest.xml
file contain?
- application name
- first activity to be shown
- main components that compose the app
- permissions
- minimum required API
- libraries used by the app
- special required hardware and software features
What are the associated lifecycle methods in Android activities in the following cases:
- called at the start of an activity
- invokes the activity and makes it visible
- core functions of an application are implemented in this method
- called when the activity is temporarily left
- releases all resources that were being used by an activity
- called when an activity is finished or being destroyed
onCreate
onStart
onResume
onPause
onStop
onRestart
onDestroy
What main parts does an XML layout file in Android consist of?
- container
- elements within the container
What are different layout managers in the XML layout of Android?
- constraint layout
- relative layout
- linear layout
- table layout
What does the term “View” or “View Object” refer to in Android?
A UI interface element.
Which groups are views grouped into?
View
s and ViewGroup
s
How is an Android view retrieved by ID in Java?
findViewById()
What main methods exist to interact with a Check Box in Android?
setChecked()
isChecked()
toggle()
What can be used to group radio buttons together?
RadioGroup
What main methods exist to interact with a Radio Group in Android?
check()
clearCheck()
getCheckedRadioButtonId()
What class is automatically generated to reference resources in Android?
R
What are the following types of resources:
- drawable
- values
- layout
- XML
- animations
- menu
- raw
- drawable: graphics
- values: strings, dimensions, styles, etc.
- layout
- XML: user-defined XML
- animations
- menu
- raw: arbitrary files
How is the R
class used to access a resource?
Through the following template R.<resource_type>.<name>
What are the main types of animations supported by Android? What are the main attributes associated with these animations?
Main Types:
* scale
* translate
* rotate
* alpha
Main Attributes:
* duration
* interpolator
* startOffset
How is the localization of resources acheived in Android?
Through the use of different subfolders with the format res/<resource_type>-<lang_code>/...
What steps are followed when determining alternative resources in Android?
- eliminate files that contradict with configurations of the device (lang is de but resource is en)
- use a qualifier precedence table to check each configuration individually (languge is more important than orientation)
- eliminate alternatives that do not include identifier from step 2
- repeat steps 2 and 3 until only one directory remains
What is a widget in Android (not an app widget)
A view object.