Quiz
DM Test
This quiz has question types that open in the usual player.
Questions in this quiz (45)
1Android is an open-source software stack that includes:
- Aoperating system, middleware, and key applications for mobile and embedded device
- Boperating system, botitomware, and key applications for mobile and embedded device
- Cincludes a rich set of API libraries that make it possible to write applications that can shape the look, feel, and function of the Android devices on which they ru
2What is not included in the software stack?
- AApplication Layer
- BSupport/Compatibility/Proprietary Libraries
- CApplication Framework
- DLinux Kernel
- EHardware Abstraction Layer (HAL)
- FNative (C/C++) Libraries & Android Runtime
- GNative (Python) Libraries & Android Runtime
- HTesting Framework
3What are the components of an android application?
- Aactivities
- Bservices
- Cintents
- Dbroadcast receivers
- Emulticast providers
- Fcontent providers
- Gnotifications
4What are Activities?
- AYour application’s presentation layer.
- BThe UI of your application is built around one or more extensions of the Activity class.
- CActivities use Fragments and Views to lay out and display information, and to respond to user actions.
- DActivities use Fragments and Render Models to lay out and display information, and to respond to user actions.
5What are services?
- AService components run without a UI, updating your data sources, triggering Notifications, and broadcasting Intents.
- BThey’re used to perform long-running tasks, or those that require no user interaction (such as tasks that need to continue even when your application’s Activities aren’t active or visible).
- CThey’re used to perform long-running tasks, or those that require user interaction (such as tasks that need to continue in the foreground).
6What are intents?
- AA powerful inter-application message-passing framework.
- BIntents are used extensively throughout Android.
- CYou will use Intents to start and stop Activities and Services
- Dto broadcast messages system- wide or to a specific Activity, Service, or Broadcast Receiver
7Broadcast Receivers start your application to react to any received Intent, making them perfect for creating event-driven applications
- ATrue
- BFalse
8" ___________"are used to receive broadcast Intents, enabling your application to listen for Intents that match the criteria you specify.
- ABroadcast Receivers (or just “Receivers”)
- BServices
- CIntents
- DActivities
9"_____________________" are the preferred means to share data across application boundaries such as media store and contacts.
- ABroadcast receivers
- BContent Providers
- Cintents
- Dservices
10"______________" enable you to alert users to application events without stealing focus or interrupting their current Activity. Typically triggered from within a Service or "_____________"
- ANotifications, Broadcast Receiver
- BIntents, Broadcast Receiver
- CServices, Notifications
11Choose the correct order of process priorities (critical to low):
- ABackground process, active Process, visible process, started background service,
- BActive Process, visible process, started background service, background process.
- CVisible process, background service, background process, active Process, started background service,
12Match priority to process:
Active Process: [blank_start]Critical Priority[blank_end]
Visible Process: [blank_start]High Priority[blank_end]
Started Background Service: [blank_start]Medium Priority[blank_end]
Background Process: [blank_start]Low Priority[blank_end]- ACritical Priority
- BHigh Priority
- CMedium Priority
- DLow Priority
13When your Application implementation is registered in the "_______________", it will be instantiated when your application process is created. As a result, if you choose to create a custom Application class implementation, it is by nature a "_________" and should be implemented as such.
- Amanifest, singleton
- Bsingleton, pom file
- Cproject, singleton
14Your application’s Application object DOES NOT remain instantiated whenever your application is running—unlike Activities, the Application is not restarted as a result of configuration changes.
- ATrue
- BFalse
15Match the following activity life cycles:
Visible Lifetime from [blank_start]onStart() until onStop()[blank_end]
Active Lifetime from [blank_start]onResume() until onPause()[blank_end]
Full Lifetime from [blank_start]onCreate() until onDestroy()[blank_end]- AonStart() until onStop()
- BonResume() until onPause()
- ConCreate() until onDestroy()
16Choose correct terms:
Each Fragment is an independent module that is loosely coupled but tightly bound to the Activity into which it is added.- Aloosely coupled, tightly bound
- Bloosely bound, tightly couples
- Ctightly bound, tightly coupled
17Fragments include a number of additional callbacks that indicate attaching and detaching the Fragment to and from its parent’s Context, creation (and destruction) of the Fragment’s View hierarchy, and the completion of the creation of the parent Activity. These include:
- AonAttach()
- BonDetach()
- ConActivityCreated()
- DonRetrofit()
- EonDisable()
18Each Activity includes a "___________" to manage the Fragments it contains. As we’re using the support library, we’ll access the Fragment Manager using the "_____________________________" method.
- AFragment Manager, getSupportFragmentManager()
- BActivity Manager, getSupportFragmentManager()
- CActivity Manager, getSupportActivityManager()
19Match the related terms to communicating between fragments and activities:
When a Fragment needs to share events with its host Activity (such as signaling UI selections), it’s good practice to create a [blank_start]callback interface[blank_end] within the Fragment that a host Activity must implement.
Fragment class that defines a public event listener interface.
[blank_start]onAttach handler[blank_end] is overridden to obtain a reference to the host Activity,
confirming that it implements the required interface.
[blank_start]onDetach handler[blank_end] sets the reference to the Activity to null.- Acallback interface
- BonAttach handler
- ConDetach handler
20Fragments can be created without a UI to provide background behavior that persists across Activity restarts caused by configuration changes.
- ATrue
- BFalse
21What method can be used to retain current fragment instance?
- AsetRetainInstance()
- BsetInstance()
- CsetRetainFragment()
22You can abstract away the impact of different device densities by always thinking in terms of density-independent pixels (dp).
- ATrue
- BFalse
23For font sizes, we use the scalable pixel (sp). The sp shares the same base density independence as dp, but is also scaled independently based on the user’s preferred text size.
- ATrue
- BFalse
24What is NOT true regarding views and layouts?
- AAll visual components in Android descend from the View class and are referred to generically as Views.
- BView Groups that focus primarily on laying out child Views are referred to as layouts.
- CView Groups that focus primarily on laying out child Views are referred to as ModelView.
- DThe ViewGroup class is an extension of View that supports adding child Views (commonly referred to as children).
25What is the simplest layout manager?
- AFrameLayout
- BLinearLayout
- CRelativeLayout
- DConstraintLayout
26What is the most flexible and efficient layout?
- AConstraintLayout
- BRelativeLayout
- CLinearLayout
- DFrameLayout
27To start a specific Activity with an EXPLICIT Intent:
Create an Intent
Intent intent = new Intent(this, ActivityName.class);
Use the Intent to start the Activity startActivity(intent);- ATrue
- BFalse
28 To create an implicit intent:
1.) create intent for an action and uri (let system handle the request)
Intent intent = new Intent(action, uri)
2.) Use the intent to start activity
startActivity(intent)- ATrue
- BFalse
29The repository is the only class that depends on multiple other classes. In this example, the repository depends on a persistent data model and a remote backend data source.
- ATrue
- BFalse
30What is the correct order of the recommended app architecture?
- Aactivity, viewmodel, repository, (model and remote data source)
- B(model and remote data source), activity, viewmodel, repository
- Cviewmodel, activity, repository, (model and remote data source)
31What benefits does view binding have over using findViewById?
- ANull safety (@Nullable for different configurations)
- BType safety (binding does automated type matching)
- CView safety
- DModel safety
32What benefits does view binding provide over data binding?
- AFaster compilation
- BEase of use
- Csupport layout variables
- Dsupport two-way data binding
33What are the disadvantages of view binding over data binding?
- Adoesn't support layout variables
- Bdoesn't support layout expressions
- Ccan't be used to declare dynamic UI content straight from XML layout files
- Ddoesn't support two-way data binding.
- EEase of use
34You should Data Binding in layouts that require advanced features and use
view binding in layouts that do not- ATrue
- BFalse
35Which of the following are true regarding the ViewModel?
- Aprovides the data for a specific UI component, such as a fragment or activity
- Bcontains data-handling business logic to communicate with the model
- Cdoesn't know about UI components, so it isn't affected by configuration changes
- Dknows about UI components, so it is affected by configuration changes
36What are the advantages of using LiveData?
- AEnsures your UI matches your data state
- BNo memory leaks
- CNo crashes due to stopped activities
- DNo more manual lifecycle handling
- EAlways up to date data
- FProper configuration changes
- GSharing resources
- Hno configuration changes
- Imanual changing data
37What is LiveData?
- Aan observable data holder
- BOther components in your app can monitor changes to objects using this holder without creating explicit and rigid dependency paths between them.
- Crespects the lifecycle state of your app's components
- Dincludes cleanup logic to prevent object leaking and excessive memory consumption.
- Erespects the lifecycle state of your app's xml file
38What are possible courotine scopes?
- AViewModelScope
- BLifecycleScope
- CLiveData (scope)
- Dcustom defined scopes
- Euser defined scopes
39[blank_start]ViewModelScope[blank_end] is defined for each ViewModel in your app. Any coroutine launched in this scope is automatically canceled if the [blank_start]ViewModel[blank_end] is cleared.
[blank_start]LifecycleScope[blank_end] is defined for each Lifecycle object. Any coroutine launched in this scope is canceled when the [blank_start]Lifecycle[blank_end] is destroyed.
[blank_start]LiveData (scope)[blank_end] When using LiveData, you might need to calculate values asynchronously. For example, you might want to retrieve a user's preferences and serve them to your UI. In these cases, you can use the liveData builder function to call a suspend function, serving the result as a LiveData object.- AViewModelScope
- BLifecycleScope
- CLiveData (scope)
- DLifecycle
- EViewModel
40Safe Args - a Gradle plugin that provides type safety when navigating and passing data between destinations.
ViewModel support - you can scope a ViewModel to a navigation graph to share UI-related data between the graph's destinations.- ATrue
- BFalse
41What are repositories?
- Amodules handle data operations
- Bprovide a clean API
- Cmediators between different data sources, such as persistent models, web services, and caches.
- Dcontrollers between one data source, such as persistent models, web services, and caches.
42What are the advantages of using dependency injection?
- AReusability of code
- BEase of refactoring
- CEase of testing
- Dnavigation
43What are two major ways to do dependency injection in android?
- AConstructor Injection
- BLiveData injection
- CField Injection
44[blank_start]Reflection-based[blank_end] solutions that connect dependencies at [blank_start]runtime[blank_end], such Spring framework, and Guice.
[blank_start]Static solutions[blank_end] that generate the code to connect dependencies at [blank_start]compile time,[blank_end] such as Dagger.- Aruntime
- Bcompile time,
- CReflection-based
- DStatic solutions
45What is the recommended library for dependency injection?
- ADagger 2
- BGuice
- CSpring Framework
- DHilt
Information
- Description
- Quiz on DM Test, created by Upma Sharma on 16/12/2020.
- Author
- Upma Sharma
- Language
- English
- Views
- 2
- Rating
- No ratings yet Rate this quiz