13/06/2021 FIT2081 Flashcards | Quizlet
FIT2081
Study
FIT2081
Terms in this set (54)
List two differences between activities and services in Android applications
Activities are a single, standalone module of an application which correlates to a single use interface screen. Whereas, a service are the processes that run in the background and don’t have a user interface
Content Resolver is the single instance in an What is an content resolver? application that provides access to your content
providers for the users
What is an content provider?
The content provider manages and implements a set of shared app data
List three components that are Activities, Services and Broadcast Receivers activated by Intents
Why does an app complied against API level 27 on a device running pie work?
Because pie runs with an API level of 28 so it can run apps compiled with previous versions (forward- compatible)
Can the app be fixed without changing the API level of the app and the device?
Not necessarily but it can be fixed by changing the API level of the app but it will affect all versions of Android. Should use support library
https://quizlet.com/au/410119668/fit2081-flash-cards/
1/8
13/06/2021 FIT2081 Flashcards | Quizlet
FIT2081
No, because it will be tricky and confusing for tShteudy user but I would use Resources because it gives you
Should we develop the app multiple times for different
languages?
the ability to translate the strings to other languages in the XML
What will happen to the back stack if the user presses the back button?
The current activity will be removed from the top of the stack resulting in the activity being destroyed and the previous activity is restored and back on the screen
What is the difference between task and activity in Android Applications?
A task is a collection of activities that users interact with when performing a certain job. Whereas, an activity is an single, standalone module of an application which correlates to a single use interface.
List the callbacks in sequence that occur for a reorientation event
onPause, onSaveInstanceState, onStop, onDestroy, onCreate, onStart, onRestoreInstanceState and onResume
List the callbacks in sequence onPause, onStop, onDestroy that occur when the code
executes the finish() method
Whats the difference between the two callbacks (reorientation callback and finish callback) ?
When an mobile is reorientated, the onSaveInstanceState callback is triggered to save the instance state data whereas the finish() method doesn’t save the instance data
What is the effect of calling It allows us to override lifecycle callbacks with a call super() in Lifecycle callbacks? to their super().
https://quizlet.com/au/410119668/fit2081-flash-cards/
2/8
13/06/2021 FIT2081 Flashcards | Quizlet
FIT2081
An example would be using super.OnCreate() wSthuidcyh allows the onCreate() method to override other
Provide an example of calling super() in Lifecycle callback?
methods
What is the difference between getPreferences() and getSharedPreferences()?
getPreferences() is used when there is only one preference file for the activity. getSharedPreferences() is used when you need multiple preference files
When and how is the API level When the emulator device is created/set up initially initially set on an emulator? in the AVD manager
Why is the measurement redundant?
The constraint is redundant because it is set to match the constraint horizontally or vertically so it will fill the available area
Attributes assigned to a view via style will only What is the difference between apply to that view. Whereas, attributes assigned it
styles and themes? via a theme will apply to that view along with all its children.
What is the main difference between guidelines and barriers in UI design?
Barrier’s position is flexible and is always based on size of UI elements. Whereas, a guideline’s position is fixed
Briefly describe two ways you can link a button to its OnClick() handler
You can either manually code the OnClick method to perform an certain method or you can implement the method by adding the method manually in the onClick settings in the layout settings
What is the purpose of super.OnBackPressed()?
The purpose of super.OnBackPressed() is to override the OnBackPressed() method and display the message when the back button is pressed.
https://quizlet.com/au/410119668/fit2081-flash-cards/
3/8
13/06/2021 FIT2081 Flashcards | Quizlet
Why return true after handling true has to be returned so Android knows the Study FIT2081
an options menu’s menu item callback was executed efficiently and doesn’t go to
click? another to another view
What is the difference between onOptionsItemSelected and onNavigationItemSelected?
onNavigationItemSelected is called when an item in the navigation menu is selected. Whereas, onOptionsItemSelected is used for the callback of the options menu
RecyclerAdapter needs to because it describes the item view have a subclass of
RecyclerAdapter.ViewHolder.
Why?
Briefly describe the control both methods are used to make the list efficient and flow (relation) between the user can scroll through the list smoothly onCreateViewHolder and
onBindViewHolder methods.
Briefly explain two differences between Fragments and Activities.
– Fragments can only be used in an activity. While activity can used on it’s own.
– An Activity may contain 0 or multiple number of fragments based on the screen size. A fragment can be reused in multiple activities.
find the best time and schedule for the next UI What does the .invalidate thread to execute. It queues the drawing on the
method do? thread so it can be carried out when the thread is not busy.
https://quizlet.com/au/410119668/fit2081-flash-cards/
4/8
13/06/2021 FIT2081 Flashcards | Quizlet
Briefly explain the events They get invoked whenever a database needs tSotubdey FIT2081
(onUpgrade and upgraded or downgraded. It is typically used when
onDownGrade) that cause an application is updated on an device. these two callbacks to get
invoked.
List the CRUD operations that Create, Retrieve, Update and Delete need a ContentValue object as
input to work.
What is the relation between onCreateViewHolder and onBindViewHolder?
onBindViewHolder grabs the viewHolder that is specified in and
onCreateViewHolder is used to set the itemTitle, itemDetail and itemImage.
What is the main purpose of To implement a mechanism for the sharing of data implementing the content between applications.
provider in an Android
application?
resolver.insert(param1, param2); What is the role datatype of param1 and param2?
Param1 – Url, role is the address of the data table that is being accessed
Param2 – content values, role is to be the values for the row that is being added into the database
Explain the statement : means the loaders make it easy to load data in an “CursorLoader’s load is activity or fragment in a asynchronous manner asynchronous”
How does a query method serve multiple URIs?
The query() method helps to pack the arguments into a Bundle, and can be called from multiple threads
https://quizlet.com/au/410119668/fit2081-flash-cards/
5/8
13/06/2021 FIT2081 Flashcards | Quizlet
FIT2081
It means that we can specify the datatypes thatSitudy uses prior to compilation and it works with multiple
What is the meaning of “Asynctask is a generic class?”
data types
What should you use to use the instance of the Geocoder’s getfromLocation transform a LatLong point into method
a street address?
Explain the three input data types to the Asynctask
Params, the type of the parameters inputted to the task when it is executed, in our case they are String. Progress, the progress units published while it is performing the background computations, in this instance it is Integer.
Result, the datatype of result of the computation, for us it is BitMap.
How can an input parameter by using the string array called params. be accessed in
doInBackground?
When and on what thread does doInBackground execute?
The doInBackground executes after the OnPreExecute has been executed and it executes in the background thread.
When and on what thread does the onPostExecute runs in the foreground after the onPostExecute execute? doInBackground method is finished executing.
When and on what thread does The onProgressUpdate executes when you call onProgressUpdate execute? publishProgress and is ran from doInBackground
event.getRawX() will return absolute coordinates What is event.getRawX() and and will be relative to the screen. An example
show an example would be event.getRawX() will give you the coordinates to a spot on the screen.
https://quizlet.com/au/410119668/fit2081-flash-cards/
6/8
13/06/2021 FIT2081 Flashcards | Quizlet
FIT2081
What is event.getX() and show
event.getX() will return you coordinates this relaStuivdey to the View. An example would be getX() will give
an example
the coordinate to a spot that is relative to just the View but not the whole screen
What is an convenience class?
A class that implements all of the methods of one or more interfaces that are empty.
Explain the difference between getAction() and getActionMasked()
getAction() returns an event and a pointer id information. Whereas, getActionMasked() returns just an event (i.e., up, down, move) information.
What is the difference between onSingleTapUp and onSingleTapConfirmed callbacks?
onSingleTapConfirmed is executed when tap occurs. Whereas, onSingleTapUp is notified when a tap occurs with the up MotionEvent that triggered it.
What is the difference between onDoubleTap and onDoupleTapEvent callbacks?
onDoubleTapEvent is notified when a double-tap occurs. Whereas, onDoubleTapEvent is notified when an event within a double-tap gesture occurs
What problem does a Resolves the problems that occurs with calling convenience class solve? anonymous class
What’s special about a returns false convenience class for a listener
interface?
What is the benefit of Instant reduces the time it takes to update your APK with Run? code and resource changes.
https://quizlet.com/au/410119668/fit2081-flash-cards/
7/8
13/06/2021 FIT2081 Flashcards | Quizlet
FIT2081
Hot swap: change implementation code of an Study existing method
Describe three scenarios where Instant Run works and one where it doesn’t
Instant Run pushes the changes without any restart.
Warm swap: change or remove an existing resource Instant Run pushes the changes and the activity restarts.
Cold swap: structural code changes
Instant Run pushes the changes and the whole app restarts
No swap: change the app manifest or change resources referenced by the app manifest or change an Android system UI element
Instant Run doesn’t run and the app has to be completely rebuilt and redeployed to the emulator or device.
How does ProGuard protect ProGuard manipulates Java the way you tell it with the source codes of Android your configuration files and the rules they contain. Application?
What are the consequences if The existing app on Google Play App Store can’t be the private key of an app is lost updated in the future.
but not compromised (i.e. no
one else acquires it)?
What are the consequences if the private key of one of your apps becomes compromised without your knowledge (i.e. someone else acquires it)?
You authoring identity and the trust of the user can be compromised. They could sign and distribute apps that maliciously replace your authentic apps or corrupt them.
https://quizlet.com/au/410119668/fit2081-flash-cards/
8/8